Exemplo n.º 1
0
        /// <summary>
        /// Starts up a game engine for the specified map
        /// </summary>
        /// <param name="mapName">The name given to the map in the file system</param>
        public Engine(GammaDraconis game, String mapName, List<Player> players)
        {
            if (instance != null)
            {
                #region Cleanup the old instance
                instance.Cleanup();
                instance = null;
                #endregion
            }
            instance = this;

            this.game = game;

            // Initialize the Renderer
            SetupGameRenderer();

            //Setup a course
            this.players = players.ToArray();

            SetupCourse(mapName);

            foreach (Player player in this.players)
            {
                player.setupDust();
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Start up the engine using the current map
 /// </summary>
 protected void loadEngine()
 {
     engine = new Engine(gammaDraconis, map, players);
     ready = true;
 }