public Level(LevelFiles files) { Files = files; LevelInform = new LevelInformation(Files); Player = new Player(LevelInform.StartPlayerLocation); GameStat = new GameInfo(); }
public LevelInformation(LevelFiles files) { Files = files; Enemies = new List <Enemy>(); Platforms = new List <Rectangle>(); Marks = new List <Mark>(); Triangles = new List <Triangle>(); Extractor = new LevelInformationExtractor(this, files); ExtractLevelFromFile(); FindFinish(); FindBoss(); }
public LevelInformationExtractor(LevelInformation level, LevelFiles files) { LevelInform = level; Files = files; LineParser = new Dictionary <string, Action <string> >() { ["PLAT"] = ExtractPlatform, ["PLE"] = ExtractPlayer, ["BUG"] = ExtractBugEnemy, ["RTE"] = ExtractRunTimeEnemy, ["END"] = ExtractEndMark, ["BOS"] = ExtractBoss, ["TRN"] = ExtractTriangle, ["WEP"] = ExtractWepon, ["STR"] = ExtractString }; }