CHero::CHero(void) : CUnit(UT_HERO)
{
	SetHP(100);
	SetMaxHP(100);
	SetAttack(9);
	SetSpeed(4);
	SetRange(1);
	SetEXPValue(0);

	SetHasAttacked(false);
	SetShielded(false);
	SetIsMoving(false);

	// TODO: Setup abilities when they are in place5
	 
	// Finds specified spell for the Hero
	CAbilityManager * pAM = CAbilityManager::GetInstance();

	GiveSpell(SP_BLANK);
	GiveSpell(SP_BLANK);
	GiveSpell(SP_BLANK);
	GiveSpell(SP_BLANK);

	for (int i=0; i<4;++i)
		m_ncooldown[i]=0;
}
Пример #2
0
// ------------------------------------------------------------------------------------------------
void ProjectileBase :: SetState(Uint32 setOwnerPlayerId, Vector2df setPos, Vector2df setHeading, float setSpeed, float setLife, Uint32 setHealth, bool setIsMoving)
{

	SetOwnerPlayerId(setOwnerPlayerId);
    SetPos(setPos);
    SetHeading(setHeading);
    SetSpeed(setSpeed);
    SetLife(setLife);
    SetHealth(setHealth);
    SetIsMoving(setIsMoving);
} // ----------------------------------------------------------------------------------------------
CSwordsman::CSwordsman(void) : CUnit(UT_SWORDSMAN)
{
	SetHP(25);
	SetMaxHP(25);
	SetAttack(8);
	SetSpeed(3);
	SetRange(1);
	SetEXPValue(75);

	SetHasAttacked(false);
	SetShielded(false);
	SetIsMoving(false);
	// TODO: Setup abilities when they are in place
}