2014-01-10 12:33:04 +01:00
|
|
|
#ifndef GAME_H
|
|
|
|
#define GAME_H
|
|
|
|
|
|
|
|
#include "GameLogicStates.h"
|
|
|
|
namespace GameLogic
|
|
|
|
{
|
2014-01-14 10:28:12 +01:00
|
|
|
class Player;
|
2014-01-10 12:33:04 +01:00
|
|
|
class Game
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
struct PlayerData
|
|
|
|
{
|
2014-01-14 10:28:12 +01:00
|
|
|
private:
|
|
|
|
friend class Game;
|
|
|
|
Player *player;
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
2014-01-10 12:33:04 +01:00
|
|
|
int playerID;
|
|
|
|
int teamID;
|
|
|
|
|
|
|
|
|
2014-01-14 10:28:12 +01:00
|
|
|
PlayerData();
|
|
|
|
|
|
|
|
PlayerData(int playerID,int teamID);
|
|
|
|
|
2014-01-10 12:33:04 +01:00
|
|
|
|
|
|
|
~PlayerData()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
2014-01-14 10:28:12 +01:00
|
|
|
|
|
|
|
/********************************************************
|
|
|
|
* Moves the chosen player based on input
|
|
|
|
* @param playerID: ID of the player you want to recieve the message
|
|
|
|
* @param movement: enum value on what kind of action is to be taken
|
|
|
|
********************************************************/
|
|
|
|
void MovePlayer(const PLAYER_MOVEMENT &movement);
|
|
|
|
|
|
|
|
|
2014-01-10 12:33:04 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
public:
|
|
|
|
Game(void);
|
|
|
|
~Game(void);
|
|
|
|
|
2014-01-14 10:28:12 +01:00
|
|
|
|
|
|
|
|
2014-01-10 12:33:04 +01:00
|
|
|
|
|
|
|
/********************************************************
|
|
|
|
* Uses the chosen players weapon based on input
|
|
|
|
* @param playerID: ID of the player you want to recieve the message
|
|
|
|
* @param Usage: enum value on what kind of action is to be taken
|
|
|
|
********************************************************/
|
|
|
|
void PlayerUseWeapon(int playerID, const WEAPON_FIRE &Usage);
|
|
|
|
|
|
|
|
/********************************************************
|
|
|
|
* Gets a specific players position
|
|
|
|
* @param playerID: ID of the player whos position you want
|
|
|
|
********************************************************/
|
|
|
|
void GetPlayerPos(int playerID);
|
|
|
|
|
|
|
|
/********************************************************
|
|
|
|
* Gets the position of all players currently in the game
|
|
|
|
********************************************************/
|
|
|
|
void GetAllPlayerPos();
|
|
|
|
|
|
|
|
/********************************************************
|
|
|
|
* Creates a player and returns PlayerData containing ID of the player
|
|
|
|
********************************************************/
|
|
|
|
PlayerData CreatePlayer();
|
|
|
|
|
|
|
|
/********************************************************
|
|
|
|
* Creates a team
|
|
|
|
********************************************************/
|
|
|
|
void CreateTeam();
|
|
|
|
|
|
|
|
/********************************************************
|
|
|
|
* Runs a update of the gamelogic and physics
|
|
|
|
********************************************************/
|
|
|
|
void NewFrame();
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
struct PrivateData;
|
|
|
|
PrivateData *myData;
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|