mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-08-27 19:27:40 +00:00
31 lines
677 B
C++
Executable File
31 lines
677 B
C++
Executable File
#include "player.h"
|
|
|
|
using namespace vb01;
|
|
|
|
namespace battleship{
|
|
Player::Player(int difficulty, int faction, Vector3 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;
|
|
}
|
|
}
|