-
Notifications
You must be signed in to change notification settings - Fork 2
Entity: GameObject.hpp
The GameObject class is child of Replica
, a class from RakNet's Replica Manager. This is effectively an object that is broadcasted to each client. It can be a player, an npc, an enemy, a destructible, anything. A GameObject is required to have a LWOOBJID identifier, to be broadcasted to the client. A GameObject also has a LOT, which is a number that indicates which object this is (player, destructible, etc), this value can be found on the cdclient
database. A name is used to override the name on the cdclient
database (used for players and npcs). A GameObject also has a creation timestamp, a spawner game object reference, a spawner node id, a parent game object reference, the children game objects's references, this object's components and finally associated timers.
All Replica
superclass required overrides: SendConstruction
, SendDestruction
, ReceiveDestruction
, SendScopeChange
, ReceiveScopeChange
, Serialize
and Deserialize
.
- Update
- Return Type:
void
- Comment: Called to update the object.
- Return Type:
- Tick
- Return Type:
void
- Comment: Called to tick the object.
- Return Type:
- Serialize
- Return Type:
void
- Input Types:
RakNet::BitStream*
factory,ReplicaTypes::PacketTypes
packetType - Comment: A wrapper of the
Replica
serialize functions.
- Return Type:
- Test
- Return Type:
void
- Comment: Literally just sets object id, LOT and name for testing.
- Return Type:
- Home
- Common
- Data Types
- Enums
- Entity
- Components
- Interface
- GameObject.hpp
- Components
- File Types
- Game Cache
- Interface
- BehaviorParameter.hpp