コード例 #1
0
 public Level(LevelFiles files)
 {
     Files       = files;
     LevelInform = new LevelInformation(Files);
     Player      = new Player(LevelInform.StartPlayerLocation);
     GameStat    = new GameInfo();
 }
コード例 #2
0
 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();
 }
コード例 #3
0
 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
     };
 }