}
bool
-Controller::hold(Control control)
+Controller::hold(Control control) const
{
return controls[control];
}
bool
-Controller::pressed(Control control)
+Controller::pressed(Control control) const
{
return !oldControls[control] && controls[control];
}
bool
-Controller::released(Control control)
+Controller::released(Control control) const
{
return oldControls[control] && !controls[control];
}
void set_control(Control control, bool value);
/** returns true if the control is pressed down */
- bool hold(Control control);
+ bool hold(Control control) const;
/** returns true if the control has just been pressed down this frame */
- bool pressed(Control control);
+ bool pressed(Control control) const;
/** returns true if the control has just been released this frame */
- bool released(Control control);
+ bool released(Control control) const;
virtual void reset();
virtual void update();