public void arcade() { Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); double multiplier = 1.0; RampageRebellion game = RampageRebellion.getGame(); Jypeli.Timer t = new Jypeli.Timer(); t.Interval = 1.0; t.Timeout += delegate { // The multiplier function multiplier = (Math.Pow(1.01, (double)stopwatch.ElapsedMilliseconds / 10000)); Console.WriteLine(multiplier); game.Add(new SmallEnemy(inCenteredXCoordinates(RandomGen.NextInt(-300, 300)), inRelativeYCoordinates(RandomGen.NextInt(0, 200), "Small"), multiplier)); t.Interval = RandomGen.NextDouble(1.0, 2.0); }; t.Start(); // Stops the stopwatch when paused, and resumes it when unpaused. // DOESN'T WORK!! while (true) { if (isPaused) { stopwatch.Stop(); Console.WriteLine("Stopped"); } while (isPaused) { Thread.Sleep(1); } if (!isPaused) { stopwatch.Start(); Console.WriteLine("Resumed"); } } }