fysxasteroids/asteroids/Controller.h

37 lines
844 B
C++

#ifndef _CONTROLLER_H
#define _CONTROLLER_H
#include "Engine.h"
#include "ControllerBase.h"
namespace asteroids {
/** \brief All possible controller states for an Entity
*
* These are used by the controller to update the current state of an Entity
* (e.g. EntityPhysicState).
*/
enum EntityControllerKeyState {
EntityKeyStateForward = 0,
EntityKeyStateTurnLeft,
EntityKeyStateTurnRight,
EntityKeyStateLast
};
class Controller : public Engine::ControllerBase {
public:
Controller () {};
void ResetPlayerEntity ();
void ResetLevel();
protected:
/** \brief Set up basic keybindings */
virtual int OnInit (int argc, char* argv[]);
/** \brief Registers the commands of the cnotroller */
virtual void OnRegisterCommands ();
virtual bool OnReceiveEvent (const Engine::EventBasePtr &event);
};
}
#endif // _CONTROLLER_H