added Distance function, quick fix for Neighbors function

This commit is contained in:
2022-01-13 16:54:37 +01:00
parent 219b99c8d7
commit 33de4f2fa6
4 changed files with 42 additions and 13 deletions
+5 -2
View File
@@ -23,10 +23,11 @@ public:
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Config")
float TileSize;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components")
USceneComponent* SceneComponent;
UFUNCTION(BlueprintCallable)
UFUNCTION(BlueprintCallable, Category = "debug")
FVector Corner(int32 i);
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "debug")
TArray<FVector> Corners;
@@ -39,9 +40,11 @@ public:
int32 R;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Runtime")
int32 Index;
UPROPERTY(BlueprintReadWrite, Category = "Runtime")
AAdventureMap* MapRef;
UFUNCTION(BlueprintCallable, Category = "Runtime")
int32 Distance(AHexTile* ToHex);
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;