Terrarium.Game.GameEngine.LoadEcosystemGame C# (CSharp) Method

LoadEcosystemGame() public static method

Creates a new game engine that can be used to load a pre-existing EcoSystem game.
public static LoadEcosystemGame ( string dataPath, string fileName, TerrariumLed leds ) : void
dataPath string The path where the Terrarium game will be stored.
fileName string The path to the serialized Terrarium.
leds TerrariumLed A series of leds to be used for state reporting.
return void
        public static void LoadEcosystemGame(string dataPath, string fileName, TerrariumLed[] leds)
        {
            if (_engine != null)
            {
                _engine.StopGame(false);
            }

            _engine = new GameEngine(dataPath, true, true, dataPath + fileName, true, leds, true);

            // Start the network after Current is set on GameEngine because the network
            // needs a current gameengine to receive teleportations
            if (_engine._usingNetwork)
            {
                _engine._networkEngine.InitializeNetwork("EcoSystem", leds);
            }

            _engine._ecosystemMode = true;
        }