Ejemplo n.º 1
0
Flag::Flag(Entity* entity) :
		Entity(entity) {
	Vector3* pos = entity->getCurrentPos();
	this->currentPos = new Vector3(pos->getX(), pos->getY(), pos->getZ());
	Coordinates coordin = entity->getCoordinates();
	this->coord = new Coordinates(coordin.getCol(), coordin.getRow());
	Base base = entity->getBase();
	Base* newBase = new Base(base);
	this->base = newBase;
	this->name = entity->getName();
	this->currentTile = NULL;
	this->team = entity->getTeam();
	this->killedBy = entity->getKilledBy();
	this->damageBuffer = 0;
	this->magic = entity->getMagic();
	this->walkable = entity->isWalkable();
	this->attackable = entity->isAttackable();
	this->hideInFog = entity->getHideInFog();
	this->shield = 0;
	this->removeFromGame = false;

	player = "";
	classname = "Flag";
	life = 30;
	attackable = true;
}
Ejemplo n.º 2
0
FreezeSpellItem::FreezeSpellItem(Item* entity) : Item(entity) {
	Vector3* pos = entity->getCurrentPos();
	this->currentPos = new Vector3(pos->getX(), pos->getY(), pos->getZ());
	Coordinates coordin = entity->getCoordinates();
	this->coord = new Coordinates(coordin.getCol(), coordin.getRow());
	Base base = entity->getBase();
	Base* newBase = new Base(base);
	this->base = newBase;
	this->name = entity->getName();
	this->life = entity->getLife();
	this->currentTile = NULL;
	this->team = entity->getTeam();
	this->killedBy = entity->getKilledBy();
}
Ejemplo n.º 3
0
Item::Item(Item* entity) : Entity(entity) {
	Vector3* pos = entity->getCurrentPos();
	this->currentPos = new Vector3(pos->getX(), pos->getY(), pos->getZ());
	Coordinates coordin = entity->getCoordinates();
	this->coord = new Coordinates(coordin.getCol(), coordin.getRow());
	Base base = entity->getBase();
	Base* newBase = new Base(base);
	this->base = newBase;
	this->name = entity->getName();
	this->life = entity->getLife();
	this->currentTile = NULL;
	this->team = entity->getTeam();
	this->killedBy = entity->getKilledBy();
	this->attackable = false;
	this->walkable = true;
	this->hideInFog = true;
}
Ejemplo n.º 4
0
bool Coordinates::isEqual(Coordinates coords){
	return ( (coords.getCol() == this->col) && (coords.getRow() == this->row) );
}
Ejemplo n.º 5
0
Coordinates::Coordinates(const Coordinates &coords) {
	changeTo(coords.getRow(), coords.getCol());
}