コード例 #1
0
 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;
     }
 }
コード例 #2
0
ファイル: Kart.cs プロジェクト: CisciarpMaster/PonyKart
        /// <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;
            }
        }
コード例 #3
0
 void OnCountdown(RaceCountdownState state)
 {
     if (state == RaceCountdownState.OneSecondAfterGo)
         derpy.ChangeAnimation("Forward1");
 }
コード例 #4
0
 void RaceCountdown_OnCountdown(RaceCountdownState state)
 {
     if (state == RaceCountdownState.Go) {
         foreach (var player in Players) {
             player.IsControlEnabled = true;
         }
     }
 }
コード例 #5
0
 /// <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;
 }
コード例 #6
0
		/// <summary>
		/// helper method
		/// </summary>
		private void Invoke(RaceCountdownState state) {
			if (OnCountdown != null)
				OnCountdown(state);
		}