Example #1
0
void IceballSkill::SkillCast(SkillKey key, const b2Vec2& heroPos, const b2Vec2& targetPos)
{
    auto hero = m_Owner->GetMyHero();
    hero->EndMove();

    m_TargetPos = targetPos;
    ShootMissile(GenerateInitPos(heroPos, targetPos));

    auto client = m_Owner->GetClient();
    client->SkillBroadCast(hero->GetUnitID(), heroPos, targetPos, key);
}
Example #2
0
void NPC::Shoot(AttackType projectile)
{
	switch (projectile)	{
	case eFireball: {
		ShootMissile();
		break;
	}
	case eBlueFlame: {
		ShootArrow();
		break;
	}
	default:
		break;
	}
}