Add method to create and get AIAttackTokenManger
This commit is contained in:
parent
57abe9a3a2
commit
ac45acb232
|
@ -3,3 +3,7 @@
|
||||||
|
|
||||||
#include "NakatomiGameInstance.h"
|
#include "NakatomiGameInstance.h"
|
||||||
|
|
||||||
|
UNakatomiAIAttackTokenManager* UNakatomiGameInstance::GetAIAttackTokenManager()
|
||||||
|
{
|
||||||
|
return IsValid(AIAttackTokenManager) ? AIAttackTokenManager : (AIAttackTokenManager = NewObject<UNakatomiAIAttackTokenManager>(this, TEXT("AI Attack Token Manager")));
|
||||||
|
}
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
#include "Engine/GameInstance.h"
|
#include "Engine/GameInstance.h"
|
||||||
|
#include "NakatomiAIAttackTokenManager.h"
|
||||||
#include "NakatomiGameInstance.generated.h"
|
#include "NakatomiGameInstance.generated.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -13,5 +14,15 @@ UCLASS()
|
||||||
class NAKATOMI_API UNakatomiGameInstance : public UGameInstance
|
class NAKATOMI_API UNakatomiGameInstance : public UGameInstance
|
||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
UPROPERTY()
|
||||||
|
UNakatomiAIAttackTokenManager* AIAttackTokenManager;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable)
|
||||||
|
UNakatomiAIAttackTokenManager* GetAIAttackTokenManager();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue