void OnCountdown(RaceCountdownState state) { countGui.Visible = true; switch (state) { case RaceCountdownState.Three: #if !DEBUG countGui.Visible = true; #endif countLabel.Text = "3"; break; case RaceCountdownState.Two: countLabel.Text = "2"; break; case RaceCountdownState.One: countLabel.Text = "1"; break; case RaceCountdownState.Go: countLabel.Text = "Go!"; break; case RaceCountdownState.OneSecondAfterGo: countGui.Visible = false; break; } }
/// <summary> /// Give it a second or two to get the wheels in the right positions before we can deactivate the karts when they're stopped /// </summary> void OnCountdown(RaceCountdownState state) { if (state == RaceCountdownState.Two) { _canDisableKarts = true; RaceCountdown.OnCountdown -= OnCountdown; } }
void OnCountdown(RaceCountdownState state) { if (state == RaceCountdownState.OneSecondAfterGo) derpy.ChangeAnimation("Forward1"); }
void RaceCountdown_OnCountdown(RaceCountdownState state) { if (state == RaceCountdownState.Go) { foreach (var player in Players) { player.IsControlEnabled = true; } } }
/// <summary> /// Start the background music, if it's a race level /// </summary> void OnCountdown(RaceCountdownState state) { if (state == RaceCountdownState.Go && bgMusic != null && LKernel.GetG<SoundMain>().IsMusicEnabled) bgMusic.Paused = false; }
/// <summary> /// helper method /// </summary> private void Invoke(RaceCountdownState state) { if (OnCountdown != null) OnCountdown(state); }