I'm quite a bit new to Object Oriented Programming. I have to implement an interface that should account for the different input types, ie. Joystick, mouse, xbox, etc.
A movement controller class will use the interface, and a player class will implement the movement class.
I'm having trouble putting these ideas into code. Well Mostly what should go inside the interface class.
Heres how I imagine it so far:
Class InputInterface
{
//What goes here?
}
class Movement : InputInterface
{
}
//Other classes that inherit InputInterface
class PlayerShip
{
public:
MovementController* movementController;
}
So I do know that most 'controller' classes (Joystick, 360 controller, etc), use functions that return either boolean or float values. So I may have data members in the interface class that can have their values set by member functions in the interface class.