public override void Tick(float dt, GameController gc) { if (firstPlayerShip.health.value <= 0 || secondPlayerShip.health.value <= 0) { gc.uiController.SetState(MenuScreenState.Retry); } firstPlayerBehavior.Update(gc, dt); secondPlayerBehavior.Update(gc, dt); }
public override void Tick(float dt, GameController gc) { if (playerShip.health.value <= 0 || enemyShip.health.value <= 0) { gc.uiController.SetState(MenuScreenState.Retry); } playerBehavior.Update(gc, dt); enemyBehavior.Update(gc, dt); }
public override void Tick(float dt, GameController gc) { if (playerShip.health.value <= 0) { gc.uiController.SetState(MenuScreenState.Retry); return; } accumulatedDt += dt; if (accumulatedDt >= 1) { currentScore.value += 1; accumulatedDt -= 1; } input.Update(gc, dt); }