예제 #1
0
파일: weapon.cpp 프로젝트: yeKcim/warmux
void Weapon::Manage()
{
  Refresh();

  Game * game_loop = Game::GetInstance();

  if (game_loop->ReadState() != Game::PLAYING)
    return;

  if (IsOnCooldownFromShot())
    return ;

  if (ActiveTeam().ReadNbUnits() == 0) {
    Deselect();

    if (m_can_change_weapon)
      Select();
    else
      game_loop->SetState(Game::HAS_PLAYED);
  }
}
예제 #2
0
bool PolecatLauncher::IsReady() const
{
  return !IsOnCooldownFromShot() && WeaponLauncher::IsReady();
}
예제 #3
0
파일: mine.cpp 프로젝트: Arnaud474/Warmux
bool Mine::ShouldBeDrawn()
{
  return !IsOnCooldownFromShot();
}