|
Isle
|
MxEntity is a base class for game entities which are uniquely identified by an integer ID and an AtomId. More...
#include <mxentity.h>


Public Member Functions | |
| MxEntity () | |
| Default constructor. More... | |
| ~MxEntity () override | |
| Virtual destructor for MxEntity. More... | |
| const char * | ClassName () const override |
| Returns the class name for type introspection. More... | |
| MxBool | IsA (const char *p_name) const override |
| Checks if the object is of the given class name or a parent type. More... | |
| virtual MxResult | Create (MxS32 p_entityId, const MxAtomId &p_atomId) |
| Initializes the entity from a given entity ID and AtomId. More... | |
| MxResult | Create (MxDSAction &p_dsAction) |
| Initializes the entity from a MxDSAction object. More... | |
| MxS32 | GetEntityId () |
| Returns the current entity ID. More... | |
| MxAtomId & | GetAtomId () |
| Returns a reference to the entity AtomId. More... | |
| void | SetEntityId (MxS32 p_entityId) |
| Sets the entity ID to the given value. More... | |
| void | SetAtomId (const MxAtomId &p_atomId) |
| Sets the AtomId to the given value. More... | |
Public Member Functions inherited from MxCore | |
| MxCore () | |
| [AI] Constructs a new MxCore object and assigns it a unique id. More... | |
| virtual | ~MxCore () |
| [AI] Virtual destructor. Required for correct polymorphic cleanup in derived classes. More... | |
| virtual MxLong | Notify (MxParam &p_param) |
| [AI] Virtual callback notification mechanism. More... | |
| virtual MxResult | Tickle () |
| [AI] Called by tickle managers to allow the object to update itself. More... | |
| virtual const char * | ClassName () const |
| [AI] Returns the runtime class name of this object. More... | |
| virtual MxBool | IsA (const char *p_name) const |
| [AI] Checks whether this object's class type or parents match the given name. More... | |
| MxU32 | GetId () |
| [AI] Gets the unique (per-process) id assigned to this object instance. More... | |
Protected Attributes | |
| MxS32 | m_entityId |
| The unique entity ID, typically used for lookup and reference. More... | |
| MxAtomId | m_atomId |
| The AtomId associated with this entity, used for resource and script identification. More... | |
MxEntity is a base class for game entities which are uniquely identified by an integer ID and an AtomId.
[AI]
[AI] MxEntity provides a unified interface for all world entities and supplies mechanisms for type information, unique identity, and entity initialization from basic parameters or from a data action (MxDSAction). Used as an ancestor for most LEGO Island actor and entity classes.
Definition at line 22 of file mxentity.h.
|
inline |
Default constructor.
Initializes entity ID to -1 (invalid). [AI]
Definition at line 28 of file mxentity.h.
|
inlineoverride |
|
inlineoverridevirtual |
Returns the class name for type introspection.
[AI]
Reimplemented from MxCore.
Definition at line 42 of file mxentity.h.
|
inline |
Initializes the entity from a MxDSAction object.
[AI]
| p_dsAction | Reference to action with object identification data. [AI] |
[AI] Sets m_entityId and m_atomId to the values from the DSAction.
Definition at line 82 of file mxentity.h.
Initializes the entity from a given entity ID and AtomId.
[AI]
| p_entityId | The integer entity ID to assign. [AI] |
| p_atomId | The AtomId to assign. [AI] |
Definition at line 69 of file mxentity.h.
|
inline |
|
inline |
|
inlineoverridevirtual |
Checks if the object is of the given class name or a parent type.
[AI]
| p_name | The class name to compare against. [AI] |
[AI] Returns true if the name matches the MxEntity class or matches any parent class via MxCore::IsA.
Reimplemented from MxCore.
Definition at line 56 of file mxentity.h.
|
inline |
Sets the AtomId to the given value.
[AI]
| p_atomId | Value to assign to m_atomId. [AI] |
Definition at line 110 of file mxentity.h.
|
inline |
Sets the entity ID to the given value.
[AI]
| p_entityId | New ID value to set. [AI] |
Definition at line 104 of file mxentity.h.
|
protected |
The AtomId associated with this entity, used for resource and script identification.
[AI]
Definition at line 124 of file mxentity.h.
|
protected |
The unique entity ID, typically used for lookup and reference.
[AI]
Definition at line 119 of file mxentity.h.