private static void InitializeLevels() { ResourceSet resourceSet = LevelStrings.ResourceManager.GetResourceSet(CultureInfo.CurrentUICulture, true, true); List<string> resouresValues = new List<string>(); foreach (DictionaryEntry entry in resourceSet) { var resourceKey = entry.Key; string resourceValue = (string)entry.Value; resouresValues.Add(resourceValue); } for (int i = 0; i < AllLevelsCount; i++) { var level = new Level(resouresValues[i]); Levels.Add(level); } //for (int i = 0; i < AllLevelsCount; i++) // { // var level = new Level(LevelStrings.ResourceManager.) // } }
public static void CompleteCurrentLevel() { CurrentLevel.Complete(); CurrentLevel = Levels.FirstOrDefault(x => x.GetIsComplete() == false); }
static GameManager() { Levels = new List<Level>(); InitializeLevels(); CurrentLevel = Levels.FirstOrDefault(); }