Platform Data Engine 0.0.1
A data-driven game engine for platformers
PlatformDataEngine::PlayerInputManager Class Reference

A basic input manager for keyboard, mouse and gamepad input from a player More...

#include <PlayerInputManager.h>

Inheritance diagram for PlatformDataEngine::PlayerInputManager:
PlatformDataEngine::InputManager

Classes

class  Axis
 
class  Button
 

Public Member Functions

sf::Vector2f getMouse ()
 
 PlayerInputManager (int gamepadIndex)
 
PlayerInputManager::AxisgetAxis (const std::string &axisName)
 Gets an axis by name More...
 
PlayerInputManager::ButtongetButton (const std::string &button)
 Gets a button by name More...
 
virtual void loadDefinition (const std::string &inputManagerFile)
 Loads input manager configuration from a json file More...
 
void serializeInputs (PDEPacket &packet)
 
virtual sf::Vector2f getMouse ()=0
 
virtual AxisgetAxis (const std::string &axisName)=0
 
virtual ButtongetButton (const std::string &button)=0
 

Detailed Description

A basic input manager for keyboard, mouse and gamepad input from a player

Member Function Documentation

◆ getAxis()

PlayerInputManager::Axis & PlayerInputManager::getAxis ( const std::string &  axisName)
virtual

Gets an axis by name

Parameters
axisNamethe axis name
Returns
the axis

Implements PlatformDataEngine::InputManager.

◆ getButton()

PlayerInputManager::Button & PlayerInputManager::getButton ( const std::string &  button)
virtual

Gets a button by name

Parameters
buttonthe button name
Returns

Implements PlatformDataEngine::InputManager.

◆ getMouse()

sf::Vector2f PlatformDataEngine::PlayerInputManager::getMouse ( )
virtual

◆ loadDefinition()

void PlayerInputManager::loadDefinition ( const std::string &  inputManagerFile)
virtual

Loads input manager configuration from a json file

Parameters
inputManagerFile

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