#include <Behaviour.h>
Public Member Functions | |
| virtual const RTTI & | getType () const |
| const GameObject & | getGameObject () |
| 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 | |
| GameObject * | gameObject |
Base class for a behaviour Component of a GameObject. Inherit in your apps to implement gameplay and game rules.
| 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.
1.7.0