1 #include "mof/KeyPressedEventCondition.hpp"
3 mof::KeyPressedEventCondition::KeyPressedEventCondition
5 mof::InputReceiver::Key key,
6 const std::shared_ptr<mof::InputReceiver> &pInputReceiver
8 : m_key(key) , m_pInputReceiver(pInputReceiver) , m_currentState(false)
13 mof::KeyPressedEventCondition::~KeyPressedEventCondition(){
16 bool mof::KeyPressedEventCondition::test(){
17 return m_oldState == false && m_currentState == true ;
20 void mof::KeyPressedEventCondition::update(){
21 m_oldState = m_currentState;
22 m_currentState = m_pInputReceiver->testKeyState(m_key);
25 bool mof::KeyPressedEventCondition::isDisposable(){