CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::InputAction Class Referenceabstract

#include <CeresEngine/Input/Action.hpp>

Inheritance diagram for CeresEngine::InputAction:
CeresEngine::ButtonOnceInputAction CeresEngine::ButtonPressedInputAction

Public Member Functions

virtual ~InputAction ()=default
 Defaulted virtual destructor.
 
 operator bool () const noexcept
 A bool conversion operator.
 
virtual void update (const InputState &state)=0
 Updates the action with the given input state.
 

Public Attributes

bool value = false
 The action state.
 

Protected Member Functions

void updateValue (bool value)
 Updates the action value.
 

Constructor & Destructor Documentation

◆ ~InputAction()

virtual CeresEngine::InputAction::~InputAction ( )
virtualdefault

Defaulted virtual destructor.

Member Function Documentation

◆ operator bool()

CeresEngine::InputAction::operator bool ( ) const
explicitnoexcept

A bool conversion operator.

Returns
The value of value

◆ update()

virtual void CeresEngine::InputAction::update ( const InputState state)
pure virtual

Updates the action with the given input state.

Parameters
stateThe input state to update the action with

Implemented in CeresEngine::ButtonPressedInputAction, and CeresEngine::ButtonOnceInputAction.

◆ updateValue()

void CeresEngine::InputAction::updateValue ( bool  value)
protected

Updates the action value.

Parameters
valueThe updated action value

Member Data Documentation

◆ value

bool CeresEngine::InputAction::value = false

The action state.


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