mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-21 12:25:30 +00:00
Updates to component classes -
Shift from ghosted components to entity-managed for networking Initial implementation of Systems through the Mesh Component
This commit is contained in:
parent
ae5a43de70
commit
68efd8e22a
15 changed files with 706 additions and 312 deletions
|
|
@ -64,9 +64,9 @@ struct ComponentField
|
|||
///
|
||||
///
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
class Component : public NetObject, public UpdateInterface
|
||||
class Component : public SimObject, public UpdateInterface
|
||||
{
|
||||
typedef NetObject Parent;
|
||||
typedef SimObject Parent;
|
||||
|
||||
protected:
|
||||
StringTableEntry mFriendlyName;
|
||||
|
|
@ -92,6 +92,10 @@ protected:
|
|||
StringTableEntry mOriginatingAssetId;
|
||||
AssetPtr<ComponentAsset> mOriginatingAsset;
|
||||
|
||||
U32 mDirtyMaskBits;
|
||||
|
||||
bool mIsServerObject;
|
||||
|
||||
public:
|
||||
Component();
|
||||
virtual ~Component();
|
||||
|
|
@ -113,7 +117,8 @@ public:
|
|||
//This is called when a different component is removed from our owner entity
|
||||
virtual void componentRemovedFromOwner(Component *comp);
|
||||
|
||||
virtual void ownerTransformSet(MatrixF *mat);
|
||||
//Overridden by components that actually care
|
||||
virtual void ownerTransformSet(MatrixF *mat) {}
|
||||
|
||||
void setOwner(Entity* pOwner);
|
||||
inline Entity *getOwner() { return mOwner ? mOwner : NULL; }
|
||||
|
|
@ -190,6 +195,16 @@ public:
|
|||
NextFreeMask = BIT(5)
|
||||
};
|
||||
|
||||
virtual void setMaskBits(U32 orMask);
|
||||
virtual void clearMaskBits() {
|
||||
mDirtyMaskBits = 0;
|
||||
}
|
||||
|
||||
bool isServerObject() { return mIsServerObject; }
|
||||
bool isClientObject() { return !mIsServerObject; }
|
||||
|
||||
void setIsServerObject(bool isServerObj) { mIsServerObject = isServerObj; }
|
||||
|
||||
virtual U32 packUpdate(NetConnection *con, U32 mask, BitStream *stream);
|
||||
virtual void unpackUpdate(NetConnection *con, BitStream *stream);
|
||||
/// @}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue