|
Voxellancer
0.3
A game about voxels in space
|
#include <worldobjectcomponents.h>
Public Member Functions | |
| WorldObjectComponents (WorldObject *worldObject) | |
| WorldObject * | worldObject () |
| const WorldObject * | worldObject () const |
| void | addEngineSlot (std::shared_ptr< EngineSlot > engineSlot) |
| void | removeEngineSlot (const EngineSlot *engineSlot) |
| std::shared_ptr< EngineSlot > | engineSlot (int index) |
|
std::list< std::shared_ptr < EngineSlot > > & | engineSlots () |
| EnginePower | enginePower () const |
| Acceleration | currentAcceleration () const |
| const EngineState & | engineState () const |
| void | setEngineState (const EngineState &engineState) |
| void | addHardpoint (std::shared_ptr< Hardpoint > hardpoint) |
| void | removeHardpoint (const Hardpoint *hardpoint) |
| std::shared_ptr< Hardpoint > | hardpoint (int index) |
|
std::list< std::shared_ptr < Hardpoint > > & | hardpoints () |
| void | fireAtPoint (const glm::vec3 &point) |
| void | fireAtObject (WorldObject *worldObject) |
| void | update (float deltaSec) |
Protected Attributes | |
| WorldObject * | m_worldObject |
|
std::list< std::shared_ptr < EngineSlot > > | m_engineSlots |
|
std::list< std::shared_ptr < Hardpoint > > | m_hardpoints |
| EngineState | m_engineState |
Module of the WorldObject that is responsible for managing all the components of a WorldObject (Engines, Weapons) and their respective slots. Also provides functions to trigger actions or retrieve values from a whole category of components. (like, fire all weapons, set all engines)