50 lines
1.5 KiB
C++
50 lines
1.5 KiB
C++
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "ResComStateManager.h"
|
|
#include "GameFramework/Actor.h"
|
|
#include "ResComPlayerStateManager.generated.h"
|
|
|
|
UENUM(BlueprintType)
|
|
enum Enum_PlayerState
|
|
{
|
|
none_ UMETA(DisplayName = "none"),
|
|
home_ UMETA(DisplayName = "home"),
|
|
infrastructure_ UMETA(DisplayName = "infrastructure"),
|
|
groupOverview UMETA(DisplayName = "groupOverview"),
|
|
houseOverview UMETA(DisplayName = "house"),
|
|
floorOverview UMETA(DisplayName = "floorOverview"),
|
|
flatOverview UMETA(DisplayName = "flatOverview"),
|
|
freeWalk UMETA(DisplayName = "freeWalk"),
|
|
parking UMETA(DisplayName = "parking")
|
|
};
|
|
|
|
UCLASS()
|
|
class FORTIS_TAKTIKA_API AResComPlayerStateManager : public AActor
|
|
{
|
|
GENERATED_BODY()
|
|
private:
|
|
ResComStateManager<Enum_PlayerState> stateManager;
|
|
public:
|
|
UFUNCTION(BlueprintCallable, Category = "State")
|
|
void SetState(const TEnumAsByte<Enum_PlayerState> newState);
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "State")
|
|
void ClearAllStatesBesideLast();
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "State")
|
|
void SetPreviousState();
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "State")
|
|
const TEnumAsByte<Enum_PlayerState> GetState() const;
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "Debug")
|
|
const FString GetStateHistoryAsString() const;
|
|
|
|
// blueprint reaction
|
|
UFUNCTION(BlueprintImplementableEvent, Category = "StateReaction")
|
|
void OnState(const TEnumAsByte<Enum_PlayerState>& newState);
|
|
|
|
}; |