Class Tangible can now recreate its Actor
This commit is contained in:
@@ -5,11 +5,11 @@
|
||||
#include "CoreMinimal.h"
|
||||
#include "UObject/NoExportTypes.h"
|
||||
#include "CommonTypes.h"
|
||||
#include "TangibleComponent.h"
|
||||
#include "Tangible.h"
|
||||
#include "TangibleManager.generated.h"
|
||||
|
||||
UCLASS()
|
||||
class INTEGRATION_API UTangibleManager : public UObject
|
||||
class INTEGRATION_API UlxTangibleManager : public UObject
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
@@ -27,9 +27,9 @@ public:
|
||||
UPROPERTY()
|
||||
TSubclassOf<AActor> ClassTangibleActor;
|
||||
|
||||
// Given a tangible ID, look up actor pointer (or NULL if actor was deleted)
|
||||
// Given a tangible ID, look up the TangibleComponent of that actor.
|
||||
UPROPERTY()
|
||||
TMap<int64, AActor*> IdToActor;
|
||||
TMap<int64, UlxTangible*> IdToTangible;
|
||||
|
||||
// Player's tangible Id.
|
||||
int64 Player;
|
||||
@@ -38,7 +38,7 @@ public:
|
||||
IdView Near;
|
||||
|
||||
public:
|
||||
UTangibleManager();
|
||||
UlxTangibleManager();
|
||||
|
||||
// Initialize the tangible manager.
|
||||
//
|
||||
@@ -49,10 +49,10 @@ public:
|
||||
UWorld* GetWorld() const override { return World.Get(); }
|
||||
|
||||
// Get the tangible if it exists, otherwise return NULL
|
||||
UTangibleComponent* GetTangible(int64 id);
|
||||
UlxTangible* GetTangible(int64 id);
|
||||
|
||||
// Get the tangible if it exists, otherwise create it.
|
||||
UTangibleComponent* MakeTangible(int64 id);
|
||||
UlxTangible* MakeTangible(int64 id);
|
||||
|
||||
// Delete the tangible.
|
||||
void DeleteTangible(int64 id);
|
||||
|
||||
Reference in New Issue
Block a user