Exemplo n.º 1
0
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;
}
Exemplo n.º 2
0
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;
}