TangibleCharacter can now be interactively controlled

This commit is contained in:
2024-02-02 15:48:27 -05:00
parent 4b3315eb76
commit d11fbca815
18 changed files with 96 additions and 28 deletions

View File

@@ -8,6 +8,8 @@
#include "Tangible.h"
#include "TangibleManager.generated.h"
class AIntegrationGameModeBase;
UCLASS()
class INTEGRATION_API UlxTangibleManager : public UObject
{
@@ -23,6 +25,10 @@ public:
UPROPERTY()
TWeakObjectPtr<UWorld> World;
// A pointer to our game mode.
UPROPERTY()
TWeakObjectPtr<AIntegrationGameModeBase> GameMode;
// Given a tangible ID, look up the TangibleComponent of that actor.
UPROPERTY()
TMap<int64, UlxTangible*> IdToTangible;
@@ -32,12 +38,15 @@ public:
// Initialize the tangible manager.
//
void Init(UWorld *world);
void Init(UWorld *world, AIntegrationGameModeBase *gamemode);
// Get a pointer to our world.
//
UWorld* GetWorld() const override { return World.Get(); }
// Get a pointer to our game mode.
AIntegrationGameModeBase *GetGameMode() { return GameMode.Get(); }
// Get the tangible if it exists, otherwise return NULL
//
UlxTangible* GetTangible(int64 id) const;