Example #1
0
void			Bomb::NormalBomb::Update()
{
  EventTreatment();
  if (this->HasComponent(Timer_c) && !this->_isDestroy)
  {
    TimerComponent	*timer = static_cast<TimerComponent *>(this->GetComponent(Timer_c));

    timer->Update();
    if (timer->IsDone() && !this->_isDestroy)
      this->Destroy();
  }
}
Example #2
0
void	Bomb::ClassicMode::Update()
{
  if (G_GameSettings->gamemode == Settings::SURVIVAL && IsOnlyOnePlayer())
    this->Destroy();
  else if (this->HasComponent(Timer_c) && !this->_isDestroy)
    {
      TimerComponent	*timer = static_cast<TimerComponent *>(this->GetComponent(Timer_c));

      timer->Update();
      if (timer->IsDone() && !this->_isDestroy && G_GameSettings->gamemode != Settings::SURVIVAL)
       this->Destroy();
    }
    this->SaveScore();
}