Begin() public abstract method

Called when the game is ready to begin. This is the entry-point for subclasses of AbstractGameLoop.
public abstract Begin ( ) : void
return void
Esempio n. 1
0
        /// <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);
        }