A virtual derived class of GameObject that allows the GameObject to be updated. More...

#include <Updatable.h>

Inheritance diagram for Updatable:

Detailed Description

A virtual derived class of GameObject that allows the GameObject to be updated.

A class that inherits from Updatable gains access to the Update() function. This allows the user to execute code every update frame.

Protected Member Functions

virtual void Update ()=0
 Function which is called every update frame. More...
 
void Register ()
 Registers the class to be Updated. More...
 
void Deregister ()
 Deregisters the class from being Updated. More...
 
- Protected Member Functions inherited from GameObject
virtual void SceneEntry ()=0
 Function which is called upon a registered scene entry. More...
 
virtual void SceneExit ()=0
 Function which is called upon a registered scene exit. More...
 

Additional Inherited Members

- Public Member Functions inherited from GameObject
void SubmitEntry ()
 Public Function to register a call for the GameObject's SceneEntry() function. More...
 
void SubmitExit ()
 Public Function to register a call for the GameObject's SceneEntry() function. More...
 

Member Function Documentation

void Updatable::Deregister ( )
inlineprotected

Deregisters the class from being Updated.

The UpdatableManager keeps track of all Updatable GameObjects. Deregistering the current Updatable GameObject removes this object from the list of Updatables to be updated by the UpdatableManager.

void Updatable::Register ( )
inlineprotected

Registers the class to be Updated.

The UpdatableManager keeps track of all Updatable GameObjects. Registering the current Updatable GameObject adds this object to the list of Updatables to be updated by the UpdatableManager.

virtual void Updatable::Update ( )
protectedpure virtual

Function which is called every update frame.

This is a pure virtual function to be overriden by the user. The Update() function will be called by the UpdatableManager every update frame as long as the current Updatable class is registered to be updated (See the Register() and Deregister() functions).