![]() |
ducttape-engine
0.2.0
A universal game engine
|
Public Types | |
|
typedef std::shared_ptr < Component > | ComponentSP |
Public Slots | |
| bool | isEnabled () |
| Returns whether the component is enabled. | |
| bool | isInitialized () |
| Returns whether the component is created. | |
| const QString | getName () const |
| Returns the name of the Component. | |
| QString | getFullName () const |
| Returns the name of the Component, including all parent names. | |
| Node * | getNode () |
| Returns the Node of this component. | |
| QScriptValue | getScriptNode () |
| Returns the Node of this component. | |
| void | initialize () |
| Initializes the component. | |
| void | deinitialize () |
| Deinitializes the component. | |
| void | enable () |
| Enables the component. | |
| void | disable () |
| Disables the component. | |
Signals | |
| void | triggered (dt::TriggerAreaComponent *trigger_area, dt::Component *component) |
| void | componentInitialized () |
| void | componentUninitialized () |
| void | componentEnabled () |
| void | componentDisabled () |
Public Member Functions | |
| TriggerAreaComponent (btCollisionShape *areaShape, const QString name="") | |
| Constructor. | |
| void | onInitialize () |
| Called when the component is activated. | |
| void | onDeinitialize () |
| Called when the component is deactivated. | |
| void | onEnable () |
| Called when the component is enabled. | |
| void | onDisable () |
| Called when the component is disabled. | |
| void | onUpdate (double time_diff) |
| Called every frame. | |
| void | setAreaShape (btCollisionShape *areaShape) |
| Setter for the area shape. | |
| void | setNode (Node *node) |
| Sets the node of this component. | |
| void | serialize (IOPacket &packet) |
| virtual void | onSerialize (IOPacket &packet) |
Protected Attributes | |
| QString | mName |
| The Component name. | |
| Node * | mNode |
| The parent Node. | |
Properties | |
| QString | name |
| bool | isEnabled |
| bool | isInitialized |
| QScriptValue | node |
Private Attributes | |
| std::unique_ptr< btCollisionShape > | mArea |
| std::unique_ptr< btGhostObject > | mObject |
| area entering which sends the Triggered signal | |
Definition at line 24 of file TriggerAreaComponent.hpp.
| dt::TriggerAreaComponent::TriggerAreaComponent | ( | btCollisionShape * | areaShape, |
| const QString | name = "" |
||
| ) |
Constructor.
| areaShape | shape of the trigger area |
| name | The name of the component. |
| QString dt::Component::getFullName | ( | ) | const [slot, inherited] |
| const QString dt::Component::getName | ( | ) | const [slot, inherited] |
| Node* dt::Component::getNode | ( | ) | [slot, inherited] |
| QScriptValue dt::Component::getScriptNode | ( | ) | [slot, inherited] |
| bool dt::Component::isEnabled | ( | ) | [slot, inherited] |
Returns whether the component is enabled.
| bool dt::Component::isInitialized | ( | ) | [slot, inherited] |
Returns whether the component is created.
| void dt::TriggerAreaComponent::onDeinitialize | ( | ) | [virtual] |
Called when the component is deactivated.
Deinitialize all scene objects here.
Reimplemented from dt::Component.
| void dt::TriggerAreaComponent::onDisable | ( | ) | [virtual] |
Called when the component is disabled.
Hide/disable all scene objects here.
Reimplemented from dt::Component.
| void dt::TriggerAreaComponent::onEnable | ( | ) | [virtual] |
Called when the component is enabled.
Show/enable all scene objects here.
Reimplemented from dt::Component.
| void dt::TriggerAreaComponent::onInitialize | ( | ) | [virtual] |
Called when the component is activated.
Initialize all scene objects here.
Reimplemented from dt::Component.
| void dt::TriggerAreaComponent::onUpdate | ( | double | time_diff | ) | [virtual] |
Called every frame.
Update the Node here.
| time_diff | The frame delta time. |
Reimplemented from dt::Component.
| void dt::TriggerAreaComponent::setAreaShape | ( | btCollisionShape * | areaShape | ) |
Setter for the area shape.
| area | Shape of the trigger area |
| void dt::Component::setNode | ( | Node * | node | ) | [inherited] |
Sets the node of this component.
| node | The node to be set. |
QString dt::Component::mName [protected, inherited] |
The Component name.
Definition at line 155 of file Component.hpp.
Node* dt::Component::mNode [protected, inherited] |
The parent Node.
Definition at line 156 of file Component.hpp.
1.8.0