Example #1
0
        internal void _StartLevel(LevelBase _level)
        {
            //if (!this._Game._TestStarted)
            //{
            //	if (this._PreviousLevel != null)
            //	{
            //		this._Game.CurrentSaveFile._SaveLevel(this._PreviousLevel, this._PreviousName);
            //		this._PreviousLevel = null;
            //	}

            //	string n = this._Regions.Where(item => item.Value == _level.Source).ToArray()[0].Key;

            //	Bunch<string> olds = this._Regions.Keys.ToArray() + n;
            //	Bunch<string> news = n;
            //	foreach (LevelConnection l in _level.Children.Where(item => item is LevelConnection).Select(item => (LevelConnection)item))
            //	{
            //		if (l.DestinationLevel != "" && !news.Contains(l.DestinationLevel))
            //			news.Add(l.DestinationLevel);
            //	}

            //	foreach (string l in news)
            //		this.LoadRegion(l);
            //	foreach (string l in olds.Where(item => !news.Contains(item)))
            //		this.UnloadLevel(l);

            //	//this._Game._SaveBank.Load(_level, n);

            //	this._PreviousLevel = _level;
            //	this._PreviousName = n;

            //	this._Game.CurrentSaveFile._PositionLevel = n;
            //}
        }
Example #2
0
 internal void _LoadSave(LevelBase _level)
 {
     //if (!this._Game._TestStarted)
     //{
     //	string n = this._Regions.Where(item => item.Value == _level.Source).ToArray()[0].Key;
     //	if (this._Game.CurrentSaveFile._Levels.ContainsKey(n))
     //		_level._SavedEntities = this._Game.CurrentSaveFile._Levels[n];
     //}
 }