public void Run() { timer = new FpsTimer(); timer.Fps = 60; DoGC(); while (SDLFrame.PollEvent() == YanesdkResult.NoError) { timer.WaitFrame(); audioDevice.Update(); inputDevice.Update(); bool gc = Tick(); if (currentState == State.Exit) { break; } if (!timer.ToBeSkip) { Draw(); } if (gc) { DoGC(); } } settings.NumUnlockedStages = numUnlockedStages; settings.Save("settings.cfg"); if (log != null) { log.Close(); } SDLFrame.Quit(); }
public void Run() { timer = new FpsTimer(); timer.Fps = 30; GameManager manager = new GameManager(audio, startLevel); manager.LoadScoreDataFromFile("score.dat"); while (SDLFrame.PollEvent() == YanesdkResult.NoError) { input.Update(); manager.Update(input); if (manager.Exiting) { break; } if (!timer.ToBeSkip) { graphics.Begin(); manager.Draw(graphics); graphics.End(); } timer.WaitFrame(); } manager.SaveScoreDataToFile("score.dat"); }
public void Dispose() { SDLFrame.Quit(); Console.WriteLine("終了しました。"); }