add a basic Player class
This commit is contained in:
parent
2c7e454ca8
commit
a568ab8fa8
9
src/common/Player.cc
Normal file
9
src/common/Player.cc
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
#include "Player.h"
|
||||||
|
|
||||||
|
Player::Player()
|
||||||
|
{
|
||||||
|
x = 0.0;
|
||||||
|
y = 0.0;
|
||||||
|
direction = 0.0;
|
||||||
|
}
|
18
src/common/Player.h
Normal file
18
src/common/Player.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
#ifndef PLAYER_H
|
||||||
|
#define PLAYER_H
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
class Player
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
std::string name;
|
||||||
|
double x;
|
||||||
|
double y;
|
||||||
|
double direction; /* 0 = East, M_PI_2 = North, M_PI = West, ... */
|
||||||
|
|
||||||
|
Player();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
Loading…
x
Reference in New Issue
Block a user