fixed crashing bug when calling RandomHex() too early

This commit is contained in:
2022-01-11 18:16:26 +01:00
parent 832507177f
commit 9021763ab7
4 changed files with 12 additions and 4 deletions
+6 -1
View File
@@ -26,11 +26,16 @@ public:
int32 GridSize = 100; // squared is the number of Tiles
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Config")
int32 TileSize = 100;
UPROPERTY(VisibleInstanceOnly, BlueprintReadWrite, Category = "MapData")
UPROPERTY(BlueprintReadOnly, Category = "Generation")
bool bHexGridReady;
UPROPERTY(VisibleInstanceOnly, BlueprintReadWrite, Category = "Runtime")
TArray<AHexTile*> Grid;
UFUNCTION(BlueprintCallable)
int32 GridIndex(int32 q, int32 r);
// Player spawn section
UPROPERTY(VisibleAnywhere, BlueprintReadWrite)
APawn* CameraPawn;