Beispiel #1
0
 public Level CreateLevel(string name, Map map)
 {
     Level level = _levels.FirstOrDefault(l => l.Name == name);
     if (level != null)
         return level;
     level = new Level(name, map);
     _levels.Add(level);
     return level;
 }
Beispiel #2
0
 public void ChangeLevel(string name)
 {
     Level level = _levels.FirstOrDefault(l => l.Name == name);
     if (level != null)
     {
         Console.WriteLine("World CHANGED LEVEL TO: " + level.Name);
         _currentLevel = level;
     }
     else
     {
         Console.WriteLine("WARNING: ChangeLevel -> NULL LEVEL: " + name);
     }
 }