/*
*file mount.cpp
*class Mount
*
*created on 25/01/2006
*Copyright Piquier Production
*
*/
      
#include "Mount.h"
#include "Config.h"
#include "MemoryManager/debugNew.h"
     
//constuctors
      
Mount::Mount(){
	this->free=true;
	Config& config = Config::getInstance();
	setHealthPoint((int)config.getVariable("Mount","healthPoint"));
	setSpeed(config.getVariable("Mount","speed"));
	setRadius(config.getVariable("Mount","radius"));
}

Mount::Mount(bool b) : Entity(){
	this->free=b;
	Config& config = Config::getInstance();
	setHealthPoint((int)config.getVariable("Mount","healthPoint"));
	setSpeed(config.getVariable("Mount","speed"));
	setRadius(config.getVariable("Mount","radius"));
}

Mount::Mount(Point2D pos,bool b) : Entity(pos){
	this->free=b;
	Config& config = Config::getInstance();
	setHealthPoint((int)config.getVariable("Mount","healthPoint"));
	setSpeed(config.getVariable("Mount","speed"));
	setRadius(config.getVariable("Mount","radius"));
}

Mount::~Mount(){
}

//methods

void Mount::changeState(){
	if(this->free==true) this->free=false;
	else this->free=true;
}

bool Mount::isFree(){
	return this->free;
}

bool Mount::haveLife(){
	return this->free;
}

