GASATHON/Project/Source/Gasa/Game/GasaPlayerState.h

62 lines
2.1 KiB
C
Raw Normal View History

2024-04-13 07:19:45 -07:00
#pragma once
2024-04-13 08:09:22 -07:00
#include "AbilitySystemInterface.h"
2024-04-13 07:19:45 -07:00
#include "GameFramework/PlayerState.h"
2024-04-13 08:09:22 -07:00
#include "GasaCommon.h"
#include "Networking/GasaNetLibrary.h"
2024-04-13 08:09:22 -07:00
2024-04-13 07:19:45 -07:00
#include "GasaPlayerState.generated.h"
UCLASS(Blueprintable)
class GASA_API AGasaPlayerState : public APlayerState
2024-04-13 08:09:22 -07:00
, public IAbilitySystemInterface
2024-04-13 07:19:45 -07:00
{
GENERATED_BODY()
public:
2024-04-13 08:09:22 -07:00
#pragma region Ability System
UPROPERTY(EditAnywhere, Category="Ability System")
bool bAutoAbilitySystem;
2024-04-13 08:09:22 -07:00
UPROPERTY(EditAnywhere, Category="Ability System")
TObjectPtr<UAbilitySystemComponent> AbilitySystem;
UPROPERTY(EditAnywhere, Category="Ability System")
TObjectPtr<UAttributeSet> Attributes;
#pragma endregion Ability System
2024-04-13 07:19:45 -07:00
AGasaPlayerState();
2024-04-13 08:09:22 -07:00
#pragma region NetSlime
// NetSlime interface is generated by GasaGen/GasaGen_NetSlime.cpp
FORCEINLINE ENetworkMode GetNetworkMode() const { return Gasa::GetNetworkMode( this ); }
FORCEINLINE bool IsClient() const { return Gasa::IsClient( this ); }
FORCEINLINE bool IsListenServer() const { return Gasa::IsListenServer( this ); }
FORCEINLINE bool IsNetOwner() const { return Gasa::IsNetOwner( this ); }
FORCEINLINE bool IsServer() const { return Gasa::IsServer( this ); }
FORCEINLINE bool IsSimulatedProxy() const { return Gasa::IsSimulatedProxy( this ); }
FORCEINLINE void NetLog(
FString Message,
EGasaVerbosity Verbosity = EGasaVerbosity::Log,
FLogCategoryBase& Category = LogGasaNet,
bool DumpStack = false,
int32 Line = __builtin_LINE(),
ANSICHAR const* File = __builtin_FILE(),
ANSICHAR const* Func = __builtin_FUNCTION()
)
{
Gasa::NetLog( this, Message, Verbosity, Category, DumpStack, Line, File, Func );
}
#pragma endregion NetSlime
2024-04-13 08:09:22 -07:00
#pragma region IAbilitySystem
FORCEINLINE UAttributeSet* GetAttributes() { return Attributes; }
FORCEINLINE UAbilitySystemComponent* GetAbilitySystemComponent() const override { return AbilitySystem; }
#pragma endregion IAbilitySystem
2024-04-13 08:56:19 -07:00
2024-04-16 14:18:06 -07:00
// #pragma region
//
// #pragma endregion
2024-04-13 07:19:45 -07:00
};