Make TangibleManager a GameInstance subsystem
This commit is contained in:
@@ -4,14 +4,13 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "UObject/NoExportTypes.h"
|
||||
#include "Subsystems/GameInstanceSubsystem.h"
|
||||
#include "Common.h"
|
||||
#include "Tangible.h"
|
||||
#include "TangibleManager.generated.h"
|
||||
|
||||
class ALuprexGameModeBase;
|
||||
|
||||
UCLASS()
|
||||
class INTEGRATION_API UlxTangibleManager : public UObject
|
||||
class INTEGRATION_API UlxTangibleManager : public UGameInstanceSubsystem
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
@@ -21,9 +20,7 @@ public:
|
||||
using IdArray = LpxCommonTypes::IdArray;
|
||||
using TanArray = TArray<UlxTangible*>;
|
||||
|
||||
// A pointer to our game mode.
|
||||
UPROPERTY()
|
||||
TWeakObjectPtr<ALuprexGameModeBase> GameMode;
|
||||
virtual void Initialize(FSubsystemCollectionBase& Collection) override;
|
||||
|
||||
// Given a tangible ID, look up the TangibleComponent of that actor.
|
||||
UPROPERTY()
|
||||
@@ -31,16 +28,6 @@ public:
|
||||
|
||||
// The Tangible ID of the possessed tangible, if any.
|
||||
UlxTangible *PossessedTangible;
|
||||
|
||||
public:
|
||||
UlxTangibleManager();
|
||||
|
||||
// Initialize the tangible manager.
|
||||
//
|
||||
void Init(ALuprexGameModeBase *gamemode);
|
||||
|
||||
// Get a pointer to our game mode.
|
||||
ALuprexGameModeBase *GetGameMode() { return GameMode.Get(); }
|
||||
|
||||
// Get the tangible if it exists, otherwise return NULL
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user