ducttape-engine  0.2.0
A universal game engine
 All Classes Functions Variables Typedefs Enumerations Enumerator
Public Types | Public Slots | Signals | Public Member Functions | Protected Attributes | Properties
dt::TriggerComponent Class Reference

A simple trigger component that triggers a callback on certain conditions. More...

#include "TriggerComponent.hpp"

Inheritance diagram for dt::TriggerComponent:
[legend]
Collaboration diagram for dt::TriggerComponent:
[legend]

List of all members.

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.
NodegetNode ()
 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 componentInitialized ()
void componentUninitialized ()
void componentEnabled ()
void componentDisabled ()

Public Member Functions

 TriggerComponent (const QString name="")
 Advanced constructor.
void onInitialize ()
 Called when the component is activated.
void onDeinitialize ()
 Called when the component is deactivated.
void onUpdate (double time_diff)
 Called every frame.
virtual void onEnable ()
 Called when the component is enabled.
virtual void onDisable ()
 Called when the component is disabled.
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.
NodemNode
 The parent Node.

Properties

QString name
bool isEnabled
bool isInitialized
QScriptValue node

Detailed Description

A simple trigger component that triggers a callback on certain conditions.

Warning:
Class not complete.

Definition at line 24 of file TriggerComponent.hpp.


Constructor & Destructor Documentation

dt::TriggerComponent::TriggerComponent ( const QString  name = "")

Advanced constructor.

Parameters:
nameThe name for this component.
See also:
Component

Member Function Documentation

QString dt::Component::getFullName ( ) const [slot, inherited]

Returns the name of the Component, including all parent names.

Returns:
The name of the Component, including all parent names.
const QString dt::Component::getName ( ) const [slot, inherited]

Returns the name of the Component.

Returns:
The name of the Component.
Node* dt::Component::getNode ( ) [slot, inherited]

Returns the Node of this component.

Returns:
The Node of this component.
QScriptValue dt::Component::getScriptNode ( ) [slot, inherited]

Returns the Node of this component.

Used for scripting access.

Returns:
The Node of this component.
bool dt::Component::isEnabled ( ) [slot, inherited]

Returns whether the component is enabled.

Returns:
Whether the component is enabled.
bool dt::Component::isInitialized ( ) [slot, inherited]

Returns whether the component is created.

Returns:
Whether the component is created.

Called when the component is deactivated.

Deinitialize all scene objects here.

Reimplemented from dt::Component.

virtual void dt::Component::onDisable ( ) [virtual, inherited]
virtual void dt::Component::onEnable ( ) [virtual, inherited]

Called when the component is activated.

Initialize all scene objects here.

Reimplemented from dt::Component.

void dt::TriggerComponent::onUpdate ( double  time_diff) [virtual]

Called every frame.

Update the Node here.

Parameters:
time_diffThe frame delta time.

Reimplemented from dt::Component.

void dt::Component::setNode ( Node node) [inherited]

Sets the node of this component.

Parameters:
nodeThe node to be set.

Member Data Documentation

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.


The documentation for this class was generated from the following file: