Public Member Functions | Static Public Attributes | Protected Attributes

Behaviour Class Reference

#include <Behaviour.h>

Inheritance diagram for Behaviour:
Component Object DebugCamera

List of all members.

Public Member Functions

virtual const RTTIgetType () const
const GameObjectgetGameObject ()
void setGameObject (GameObject *object)
virtual void onMouseMotion (const SDL_MouseMotionEvent &event)
virtual void onMouseButton (const SDL_Event &event)
virtual void onJoystickButton (const SDL_Event &event)
virtual void onKeyboard (const SDL_KeyboardEvent &event)
virtual void update ()
virtual void onCollisionEnter (const CollisionHit &hit)

Static Public Attributes

static const RTTI TYPE

Protected Attributes

GameObjectgameObject

Detailed Description

Base class for a behaviour Component of a GameObject. Inherit in your apps to implement gameplay and game rules.


Member Function Documentation

const GameObject & Behaviour::getGameObject (  ) 

Get a reference to the GameObject owner of the behaviour.

Reimplemented from Component.

void Behaviour::onCollisionEnter ( const CollisionHit hit  )  [virtual]

Callback function on collision events.

void Behaviour::onJoystickButton ( const SDL_Event &  event  )  [virtual]

Called by the engine on joystick button events. Override to implement joystick controls.

void Behaviour::onKeyboard ( const SDL_KeyboardEvent &  event  )  [virtual]

Called by the engine on keyboard events. Override to implement keyboard controls.

Reimplemented in DebugCamera.

void Behaviour::onMouseButton ( const SDL_Event &  event  )  [virtual]

Called by the engine on mouse button events. Override to implement mouse controls.

void Behaviour::onMouseMotion ( const SDL_MouseMotionEvent &  event  )  [virtual]

Called by the engine on mouse motion events. Override to implement mouse controls.

Reimplemented in DebugCamera.

void Behaviour::setGameObject ( GameObject object  ) 

Set the GameObject owner of the behaviour.

Reimplemented from Component.

void Behaviour::update (  )  [virtual]

Called by the engine once per frame. Override to implement physics.

Reimplemented in DebugCamera.


The documentation for this class was generated from the following files:
 All Classes Functions Variables