#pragma once #include "CoreMinimal.h" #include "GameFramework/PlayerController.h" #include "AdventurePlayerController.generated.h" class AAdventureMap; class AHexTile; class AAdventureCameraPawn; class AAdventureCharacter; class AMapObject; class AMovementArrow; /** * */ UCLASS() class FRAY_API AAdventurePlayerController : public APlayerController { GENERATED_BODY() public: AAdventurePlayerController(); // General UPROPERTY() UWorld* World; UPROPERTY(VisibleAnywhere, BlueprintReadWrite) AAdventureMap* MapRef; UPROPERTY(VisibleAnywhere, BlueprintReadWrite) AAdventureCameraPawn* CamRef; UPROPERTY(VisibleAnywhere, BlueprintReadWrite) AHexTile* SpawnHex; UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Runtime") AHexTile* CurrentHex; UPROPERTY(BlueprintReadWrite, EditAnywhere) AHexTile* HoveredHex; UFUNCTION(BlueprintCallable) void LeftClick(); UPROPERTY(BlueprintReadOnly, EditDefaultsOnly) TSubclassOf MoveArrowClass; UFUNCTION(BlueprintCallable) void MarkPath(TArray Path); UPROPERTY(BlueprintReadWrite, VisibleAnywhere) TArray PathArrows; UFUNCTION(BlueprintCallable) void ClearPath(); UPROPERTY(EditAnywhere, BlueprintReadWrite) int32 VisionRadius = 6; UFUNCTION(BlueprintCallable) TSet Vision(int32 Radius); UPROPERTY(EditAnywhere, BlueprintReadWrite) TSet ExploredHexes; protected: virtual void BeginPlay() override; virtual void SetupInputComponent() override; public: // Object Placement UPROPERTY(BlueprintReadWrite, VisibleAnywhere) bool bInPlacementMode; UPROPERTY(BlueprintReadWrite, EditAnywhere) TSubclassOf PlaceObjClass; UPROPERTY(BlueprintReadWrite, VisibleAnywhere) AMapObject* PlaceObj; UFUNCTION(BlueprintCallable) void EnablePlacing(); UFUNCTION(BlueprintCallable) void DisablePlacing(); UFUNCTION(BlueprintCallable) void FitOnGrid(AMapObject* MapObject); UFUNCTION() void PlaceObject(TSubclassOf MapObjClass, AHexTile* OnHex); // Called every frame virtual void Tick(float DeltaTime) override; };