Files
PlanetFleet/player.cpp
T
devZoGok 179f4c28ac factored out a state manager
using GameManager via a singleton
2021-10-30 08:09:30 +03:00

31 lines
781 B
C++
Executable File

#include "player.h"
using namespace game::core;
namespace game{
namespace content{
Player::Player(int difficulty, int faction,vector3df spawnPoint) {
this->difficulty = difficulty;
this->faction = faction;
this->spawnPoint=spawnPoint;
}
Player::~Player() {
}
void Player::update() {
}
bool Player::isThisPlayersUnit(Unit *u) {
bool foundUnit = false;
if (units.size() > 0) {
for (int i = 0; i < units.size() && !foundUnit; i++)
if (units[i] == u)
foundUnit = true;
return foundUnit;
} else
return false;
}
}
}