2025-01-04 16:41:49 +00:00
|
|
|
|
// © 2024 Long Ly. All rights reserved. Any unauthorized use, reproduction, or distribution of this trademark is strictly prohibited and may result in legal action.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
|
#include "ModularGameplayActors/OLSModularPlayerState.h"
|
|
|
|
|
#include "OLSPlayerState.generated.h"
|
|
|
|
|
|
2025-01-08 05:30:09 +00:00
|
|
|
|
|
2025-01-04 16:41:49 +00:00
|
|
|
|
/**
|
|
|
|
|
* AOLSPlayerState
|
|
|
|
|
*
|
|
|
|
|
* Base player state class used by this project.
|
|
|
|
|
*/
|
|
|
|
|
UCLASS(Config = Game)
|
|
|
|
|
class OLS_API AOLSPlayerState : public AOLSModularPlayerState
|
|
|
|
|
{
|
|
|
|
|
GENERATED_BODY()
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
AOLSPlayerState(const FObjectInitializer& objectInitializer);
|
|
|
|
|
|
2025-01-08 05:30:09 +00:00
|
|
|
|
static const FName NAME_OLSAbilityReady;
|
2025-01-04 16:41:49 +00:00
|
|
|
|
|
|
|
|
|
//~ Begin AActor interface
|
|
|
|
|
virtual void PostInitializeComponents() override;
|
2025-01-08 05:30:09 +00:00
|
|
|
|
virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;
|
2025-01-04 16:41:49 +00:00
|
|
|
|
//~ End AActor interface
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "OLS|PlayerState")
|
|
|
|
|
class AOLSPlayerController* GetOLSPlayerController() const;
|
|
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "OLS|PlayerState")
|
|
|
|
|
class UOLSAbilitySystemComponent* GetOLSAbilitySystemComponent() const;
|
2025-01-08 05:30:09 +00:00
|
|
|
|
|
|
|
|
|
template <class T>
|
|
|
|
|
const T* GetPawnData() const;
|
|
|
|
|
|
2025-01-09 23:05:57 +00:00
|
|
|
|
void SetPawnData(const class UOLSPawnDataAsset* pawnData);
|
2025-01-08 05:30:09 +00:00
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
UFUNCTION()
|
|
|
|
|
void OnRep_PawnData();
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
UPROPERTY(ReplicatedUsing = OnRep_PawnData)
|
2025-01-09 23:05:57 +00:00
|
|
|
|
TObjectPtr<const class UOLSPawnDataAsset> PawnData = nullptr;
|
2025-01-04 16:41:49 +00:00
|
|
|
|
};
|