示例#1
0
        private void StartWarningIfNotRunning(RacingController controller)
        {
            var wasRunning = true;

            if (WarningTime == null)
            {
                WarningTime = new PausableStopwatch();
                wasRunning  = false;
            }
            else if (!WarningTime.IsRunning)
            {
                WarningTime.Start();
                wasRunning = false;
            }

            if (!wasRunning)
            {
                // play sound
                var a = controller.WarningZombie;
                a.Play(controller.WarningIntensity.Evaluate(0));
            }
        }
示例#2
0
 public RoundInformation()
 {
     Timer = new PausableStopwatch();
 }