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
+4 -4
View File
@@ -34,12 +34,12 @@ public:
UPROPERTY(VisibleInstanceOnly, BlueprintReadWrite, Category = "Generation")
TArray<AHexTile*> Grid;
UFUNCTION(BlueprintCallable)
UFUNCTION(BlueprintCallable, Category = "Runtime")
int32 GridIndex(int32 q, int32 r);
UFUNCTION(BlueprintCallable)
UFUNCTION(BlueprintCallable, Category = "Runtime")
AHexTile* RandomHex();
UFUNCTION(BlueprintCallable)
TArray<AHexTile*> Neighbors(AHexTile* OfHexTile);
UFUNCTION(BlueprintCallable, Category = "Runtime")
TArray<AHexTile*> Neighbors(AHexTile* OfHex);
// Player spawn section
UPROPERTY(VisibleAnywhere, BlueprintReadWrite)