Robot Devastation
Public Member Functions | List of all members
rd::InputEventListener Class Referenceabstract

Interface for objects that can be notified of input events by the InputManager. More...

#include <InputEventListener.hpp>

Inheritance diagram for rd::InputEventListener:
rd::DeadState rd::GameState rd::InitState rd::MockInputEventListener rd::test::TestEventListener

Public Member Functions

virtual bool onKeyDown (const Key &k)=0
 This function will be called whenever a key is pressed on the keyboard. More...
 
virtual bool onKeyUp (const Key &k)=0
 This function will be called whenever a key is released on the keyboard. More...
 
virtual bool onWindowEvent (const WindowEvent &event)=0
 This function will be called whenever a window event is raised. More...
 

Detailed Description

InputEventListener follows the observer design pattern.

Member Function Documentation

◆ onKeyDown()

virtual bool rd::InputEventListener::onKeyDown ( const Key k)
pure virtual
Parameters
kKey that triggered the event

Implemented in rd::test::TestEventListener, rd::GameState, rd::InitState, rd::DeadState, and rd::MockInputEventListener.

◆ onKeyUp()

virtual bool rd::InputEventListener::onKeyUp ( const Key k)
pure virtual
Parameters
kKey that triggered the event

Implemented in rd::test::TestEventListener, rd::GameState, rd::InitState, rd::DeadState, and rd::MockInputEventListener.

◆ onWindowEvent()

virtual bool rd::InputEventListener::onWindowEvent ( const WindowEvent event)
pure virtual
Parameters
eventWindowEvent object that wraps the window event

Implemented in rd::test::TestEventListener, rd::GameState, rd::InitState, rd::DeadState, and rd::MockInputEventListener.


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