Camera now following Pawn

This commit is contained in:
2022-01-26 16:48:58 +01:00
parent 986233d960
commit b7b9963a68
7 changed files with 56 additions and 45 deletions
+12
View File
@@ -45,6 +45,18 @@ void AAdventurePlayerController::LeftClick()
if (bInPlacementMode) { PlaceObject(PlaceObjClass, HoveredHex); }
}
TArray<AHexTile*> AAdventurePlayerController::Vision()
{
TArray<AHexTile*> Results;
TArray<AHexTile*> Visible = MapRef->BreadthFirstSearch(CurrentHex, 7);
for (auto& Hex : Visible) {
if (ExploredHexes.Contains(Hex)) { continue; }
Results.Add(Hex);
ExploredHexes.Add(Hex);
}
return Results;
}
void AAdventurePlayerController::TogglePlacing()
{
bInPlacementMode = !bInPlacementMode;