|
Thrive
|
Base class for components. More...
#include <component.h>
Public Member Functions | |
| virtual | ~Component ()=0 |
| Destructor. | |
| bool | isVolatile () const |
| A volatile component is not serialized during a save. More... | |
| virtual void | load (const StorageContainer &storage)=0 |
| Loads the component. More... | |
| EntityId | owner () const |
| The entity this component belongs to. More... | |
| void | setVolatile (bool isVolatile) |
| Sets the volatile flag. More... | |
| void | setOwner (EntityId owner) |
| Sets the component's owner. More... | |
| virtual StorageContainer | storage () const =0 |
| Serializes the component. More... | |
| virtual ComponentTypeId | typeId () const =0 |
| The component's type id. | |
| virtual std::string | typeName () const =0 |
| The component's type name. | |
Static Public Member Functions | |
| static luabind::scope | luaBindings () |
| Lua bindings. More... | |
Base class for components.
Components are mainly data classes that "tag" entities with certain properties.
Good introductions to entity / component models:
| bool Component::isVolatile | ( | ) | const |
A volatile component is not serialized during a save.
|
pure virtual |
Loads the component.
| storage |
Implemented in thrive::SoundSourceComponent, thrive::RigidBodyComponent, thrive::TimedCompoundEmitterComponent, thrive::OgreLightComponent, thrive::TextOverlayComponent, thrive::CompoundAbsorberComponent, thrive::OgreViewportComponent, thrive::OgreCameraComponent, thrive::SkyPlaneComponent, thrive::CompoundEmitterComponent, thrive::OgreSceneNodeComponent, thrive::CollisionComponent, thrive::OgreWorkspaceComponent, thrive::CompoundCloudComponent, thrive::CompoundComponent, thrive::PowerupComponent, thrive::MembraneComponent, thrive::TimedLifeComponent, and thrive::MembraneGenerationComponent.
|
static |
Lua bindings.
Wrapper class to enable subclassing Component in Lua.
Exposes:
|
inline |
The entity this component belongs to.
|
inline |
| void Component::setVolatile | ( | bool | isVolatile | ) |
|
pure virtual |
Serializes the component.
Implemented in thrive::RigidBodyComponent, thrive::SoundSourceComponent, thrive::TimedCompoundEmitterComponent, thrive::CompoundAbsorberComponent, thrive::OgreLightComponent, thrive::OgreCameraComponent, thrive::TextOverlayComponent, thrive::OgreViewportComponent, thrive::SkyPlaneComponent, thrive::CompoundEmitterComponent, thrive::CollisionComponent, thrive::OgreSceneNodeComponent, thrive::OgreWorkspaceComponent, thrive::CompoundCloudComponent, thrive::CompoundComponent, thrive::PowerupComponent, thrive::MembraneComponent, thrive::TimedLifeComponent, and thrive::MembraneGenerationComponent.
1.8.10