Variants / Chaining / Icons / ...
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Components/StaticMeshComponent.h"
|
||||
#include "DrawDebugHelpers.h"
|
||||
#include "BuildingBlock.generated.h"
|
||||
|
||||
UCLASS()
|
||||
@@ -18,22 +19,33 @@ public:
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite)
|
||||
UStaticMeshComponent* StaticMesh;
|
||||
|
||||
// How many hits can this block take before getting destroyed
|
||||
UPROPERTY(BlueprintReadWrite, EditAnywhere)
|
||||
float Health = 100.0f;
|
||||
int32 HitsRemaining = 1;
|
||||
|
||||
UPROPERTY(BlueprintReadOnly)
|
||||
int32 Index = 0;
|
||||
|
||||
UPROPERTY(BlueprintReadOnly)
|
||||
float InitialHealth;
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite)
|
||||
bool HasVariants = false;
|
||||
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite)
|
||||
int32 Variant = 0;
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void DepleteHealth(float Amount);
|
||||
void TakeHit();
|
||||
|
||||
UFUNCTION(BlueprintImplementableEvent)
|
||||
void UpdateDestructionLevel(uint8 Level);
|
||||
|
||||
UFUNCTION(BlueprintImplementableEvent)
|
||||
UFUNCTION(BlueprintImplementableEvent, BlueprintCallable)
|
||||
void DestroyBlock();
|
||||
|
||||
UFUNCTION(BlueprintImplementableEvent)
|
||||
void FadeIn();
|
||||
|
||||
UFUNCTION(BlueprintImplementableEvent, BlueprintCallable)
|
||||
void DestroyWithDelay();
|
||||
|
||||
// Get neighbouring Blocks with same color variant
|
||||
UFUNCTION(BlueprintCallable)
|
||||
TArray<ABuildingBlock*> GetSameVariantNeighbours();
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user