|
Thrive
|
Component for entities that work as powerups. More...
#include <powerup_system.h>
Public Member Functions | |
| void | setEffect (std::function< bool(EntityId)> *effect) |
| Sets the effect to use upon activation of the powerup. More... | |
| void | setEffect (const luabind::object &effect) |
| Sets the effect to use upon activation of the powerup The effect does not get saved when the game is saved. More... | |
| void | load (const StorageContainer &storage) override |
| Loads the component. More... | |
| StorageContainer | storage () const override |
| Serializes the component. More... | |
Public Member Functions inherited from thrive::Component | |
| virtual | ~Component ()=0 |
| Destructor. | |
| bool | isVolatile () const |
| A volatile component is not serialized during a save. 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 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... | |
Static Public Member Functions inherited from thrive::Component | |
| static luabind::scope | luaBindings () |
| Lua bindings. More... | |
Friends | |
| class | PowerupSystem |
Component for entities that work as powerups.
|
overridevirtual |
|
static |
| void PowerupComponent::setEffect | ( | std::function< bool(EntityId)> * | effect | ) |
Sets the effect to use upon activation of the powerup.
| effect | Function taking the entityId of the activating entity. |
| void PowerupComponent::setEffect | ( | const luabind::object & | effect | ) |
Sets the effect to use upon activation of the powerup The effect does not get saved when the game is saved.
| effect | Lua function taking the entityId of the activating entity. |
|
overridevirtual |
1.8.10