plan to implement pathfinding; minor fixes & refactorings

This commit is contained in:
2022-01-12 18:22:16 +01:00
parent 9021763ab7
commit b5c9c661fe
6 changed files with 56 additions and 28 deletions
+8 -13
View File
@@ -22,19 +22,22 @@ public:
TSubclassOf<AHexTile> BaseTileClass;
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Config")
TSubclassOf<ACharacter> BasePartyCharacterClass;
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Config")
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Config")
int32 GridSize = 100; // squared is the number of Tiles
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Config")
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Config")
int32 TileSize = 100;
UFUNCTION(BlueprintCallable, Category = "Generation")
void MakeGrid();
UPROPERTY(BlueprintReadOnly, Category = "Generation")
bool bHexGridReady;
UPROPERTY(VisibleInstanceOnly, BlueprintReadWrite, Category = "Runtime")
UPROPERTY(VisibleInstanceOnly, BlueprintReadWrite, Category = "Generation")
TArray<AHexTile*> Grid;
UFUNCTION(BlueprintCallable)
int32 GridIndex(int32 q, int32 r);
UFUNCTION(BlueprintCallable)
AHexTile* RandomHex();
// Player spawn section
UPROPERTY(VisibleAnywhere, BlueprintReadWrite)
@@ -42,15 +45,7 @@ public:
UPROPERTY(VisibleAnywhere, BlueprintReadWrite)
AAdventureCharacter* PlayerCharacter;
UFUNCTION(BlueprintCallable)
void MakeGrid();
UFUNCTION(BlueprintCallable)
AHexTile* RandomHex();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
};