Add method to create and get AIAttackTokenManger
This commit is contained in:
parent
57abe9a3a2
commit
ac45acb232
|
@ -3,3 +3,7 @@
|
|||
|
||||
#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 "Engine/GameInstance.h"
|
||||
#include "NakatomiAIAttackTokenManager.h"
|
||||
#include "NakatomiGameInstance.generated.h"
|
||||
|
||||
/**
|
||||
|
@ -14,4 +15,14 @@ class NAKATOMI_API UNakatomiGameInstance : public UGameInstance
|
|||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
private:
|
||||
|
||||
UPROPERTY()
|
||||
UNakatomiAIAttackTokenManager* AIAttackTokenManager;
|
||||
|
||||
public:
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
UNakatomiAIAttackTokenManager* GetAIAttackTokenManager();
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue