small changes & cleanup

This commit is contained in:
2022-01-29 20:54:35 +01:00
parent 2bf072e3c6
commit 429ce51805
7 changed files with 32 additions and 67 deletions
+4 -2
View File
@@ -26,7 +26,7 @@ public:
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Config")
TSubclassOf<AHexTile> BaseTileClass;
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Config")
int32 GridSize = 100; // squared is the number of Tiles
int32 GridSize = 100;
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Config")
int32 TileSize = 100;
@@ -76,12 +76,14 @@ public:
UFUNCTION(BlueprintCallable, Category = "Runtime")
TArray<AHexTile*> Neighbors(AHexTile* OfHex, bool bFreeOnly);
UFUNCTION(BlueprintCallable, Category = "Runtime")
TArray<AHexTile*> FreeDiags(AHexTile* OfHex);
TArray<AHexTile*> FreeDiagonals(AHexTile* OfHex);
UFUNCTION(BlueprintCallable, Category = "Runtime")
TSet<AHexTile*> BreadthFirstSearch(AHexTile* Start, int32 Radius);
UFUNCTION(BlueprintCallable, Category = "Runtime")
TArray<AHexTile*> FindPathAStar(AHexTile* Start, AHexTile* Goal, bool bDiags);
// considering a MapObjectManager class or moving pathfinding & search to PlayerController
UPROPERTY(BlueprintReadWrite, EditAnywhere)
TMap<AHexTile*, AMapObject*> MapObjects;
UPROPERTY(BlueprintReadOnly)