Created
December 17, 2014 14:38
-
-
Save LaylBongers/a8ebe008fdf1bf0d3847 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using Subterran; | |
| namespace TropicalIsland | |
| { | |
| internal static class TropicalIsland | |
| { | |
| public static void Run() | |
| { | |
| var data = new GameData(); | |
| // Set up our game loops | |
| var loopManager = new LoopManager(); | |
| loopManager.Loops.Add(Loop | |
| .ThatCalls(() => Update(data)) | |
| .WithRateOf(120).PerSecond()); | |
| loopManager.Loops.Add(Loop | |
| .ThatCalls(() => Render(data))); | |
| loopManager.Run(); | |
| } | |
| private static void Update(GameData data) | |
| { | |
| Console.WriteLine("Update"); | |
| } | |
| private static void Render(GameData data) | |
| { | |
| Console.WriteLine("Render"); | |
| } | |
| private class GameData | |
| { | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment