supertux
Public Member Functions | List of all members
CodeController Class Referencefinal

This is a dummy controller that doesn't react to any user input but should be controlled by code. More...

#include <codecontroller.hpp>

Inheritance diagram for CodeController:
Inheritance graph
[legend]
Collaboration diagram for CodeController:
Collaboration graph
[legend]

Public Member Functions

virtual void update () override
 
void press (Control c, bool pressed=true)
 
- Public Member Functions inherited from Controller
void set_control (Control control, bool value)
 
void set_jump_key_with_up (bool value)
 
void set_touchscreen (bool value)
 Touchscreen flag is set by MobileController, cleared when starting the level.
 
bool hold (Control control) const
 returns true if the control is pressed down
 
bool pressed (Control control) const
 returns true if the control has just been pressed down this frame
 
template<typename... Control>
bool pressed_any (Control &&... controls) const
 
bool released (Control control) const
 returns true if the control has just been released this frame
 
void reset ()
 
bool is_touchscreen () const
 returns true if the controller event has been generated by touchscreen
 

Additional Inherited Members

- Protected Attributes inherited from Controller
bool m_controls [static_cast< int >(Control::CONTROLCOUNT)]
 current control status
 
bool m_old_controls [static_cast< int >(Control::CONTROLCOUNT)]
 control status at last frame
 
bool m_touchscreen
 the event has been generated by touchscreen
 
bool m_jump_key_pressed
 the jump key is pressed for this controller
 

Detailed Description

This is a dummy controller that doesn't react to any user input but should be controlled by code.


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