Mouse* InputManager::getMouse() const { for( size_t i = 0; i < devices.size(); i++ ) { InputDevice* device = devices[i]; if( device->getType() == InputDeviceType::Mouse ) return static_cast<Mouse*>( device ); } return nullptr; }
Keyboard* InputManager::getKeyboard() const { for( size_t i = 0; i < devices.size(); i++ ) { InputDevice* device = devices[i]; if( device->getType() == InputDeviceType::Keyboard ) return static_cast<Keyboard*>( device ); } return nullptr; }