Some progress toward tangible GC:
This commit is contained in:
@@ -14,9 +14,10 @@ class INTEGRATION_API UlxTangibleManager : public UObject
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
// Import these types into our Namespace.
|
||||
using IdArray = CommonTypes::IdArray;
|
||||
// Types used frequently.
|
||||
using IdView = CommonTypes::IdView;
|
||||
using IdArray = CommonTypes::IdArray;
|
||||
using TanArray = TArray<UlxTangible*>;
|
||||
|
||||
// A pointer to our world.
|
||||
UPROPERTY()
|
||||
@@ -31,12 +32,6 @@ public:
|
||||
UPROPERTY()
|
||||
TMap<int64, UlxTangible*> IdToTangible;
|
||||
|
||||
// Player's tangible Id.
|
||||
int64 Player;
|
||||
|
||||
// Tangibles near the actor.
|
||||
IdView Near;
|
||||
|
||||
public:
|
||||
UlxTangibleManager();
|
||||
|
||||
@@ -49,28 +44,30 @@ public:
|
||||
UWorld* GetWorld() const override { return World.Get(); }
|
||||
|
||||
// Get the tangible if it exists, otherwise return NULL
|
||||
UlxTangible* GetTangible(int64 id);
|
||||
//
|
||||
UlxTangible* GetTangible(int64 id) const;
|
||||
|
||||
// Get the tangible if it exists, otherwise create it.
|
||||
//
|
||||
UlxTangible* MakeTangible(int64 id);
|
||||
|
||||
// Delete the tangible.
|
||||
//
|
||||
void DeleteTangible(int64 id);
|
||||
|
||||
// Get/Set the Id of the actor.
|
||||
//
|
||||
int64 GetPlayer() const { return Player; };
|
||||
void SetPlayer(int64 id) { Player = id; }
|
||||
// Get an array of all tangibles.
|
||||
//
|
||||
TanArray GetAllTangibles() const;
|
||||
|
||||
// Update the 'NearAccordingToLuprex' flags.
|
||||
//
|
||||
// Also creates any tangibles that are in the near-list,
|
||||
// if they don't already exist.
|
||||
//
|
||||
void UpdateNear(IdView near);
|
||||
|
||||
// Get/Set the list of tangibles near the player, according to Luprex.
|
||||
// Given an array of tangibles, return an array of tangible Ids.
|
||||
//
|
||||
IdView GetNear() const { return Near; }
|
||||
void SetNear(IdView near) { Near = near; }
|
||||
|
||||
// Get the Live list.
|
||||
//
|
||||
// Efficiency note: this makes a copy of the array.
|
||||
//
|
||||
IdArray GetLive();
|
||||
static IdArray GetIds(const TanArray &tans);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user