/// <summary> /// Starts the game's processing. Make sure that the game has been initialized through a call to /// Initialize() first. Game call will not return until the user has quit the game. /// </summary> /// <param name="loop">The AbstractGameLoop that's responsible for delegating to game logic.</param> public static void Run(AbstractGameLoop loop) { if (Scheduler == null) Scheduler = new SingleThreadedScheduler(); if (Game.OnGameInitialization != null) Game.OnGameInitialization(null, internedEventArg); loop.Begin(); if (Game.OnGameTermination != null) Game.OnGameTermination(null, internedEventArg); }
/// <summary> /// The logic tick at the core of the StepwiseGameLoop or RealtimeGameLoop. /// Primary game logic is done in this function. /// </summary> /// <param name="loop"></param> protected internal virtual void GameLoopTick(AbstractGameLoop loop) { #if DEBUG Console.WriteLine(this.GetType().Name + ".GameLoopTick(" + loop.GetType().Name + ")"); #endif }