Show PlayerController.h syntax highlighted
#pragma once
#include "../EventManager.h"
#include <string>
#include <iostream>
/**
=======================
Control the Players actions
=======================
*/
class PlayerController
{
public:
PlayerController(void);
/** Gather input, and send events */
void GatherEvents();
private:
int m_oldButtons;
public:
virtual ~PlayerController(void);
};
/** Event Type for motion */
struct PlayerMovement : public IEventData
{ PlayerMovement(int b) { buttons = b; };
int buttons;
IEventData* Copy() { return new PlayerMovement(buttons); };
virtual ~PlayerMovement() {IEventData::~IEventData(); };
};
struct entmove
{
entmove() {};
virtual ~entmove() {};
void Update(long dt);
};
See more files for this project here