private OpponentsFile() : base(GameVars.BasePath + "opponent.txt") { Opponents = new List <OpponentInfo>(); int nbrOpponents = ReadLineAsInt(); for (int i = 0; i < nbrOpponents; i++) { OpponentInfo opp = new OpponentInfo(); opp.Name = ReadLine(); SkipLines(1); //short name, race # int raceNumber = ReadLineAsInt(); opp.StrengthRating = ReadLineAsInt(); SkipLines(1); if (GameVars.Emulation != EmulationMode.Demo) { SkipLines(1); } opp.FileName = ReadLine(); SkipLines(1); //fli int nbrTextChunks = ReadLineAsInt(); for (int j = 0; j < nbrTextChunks; j++) { SkipLines(2); int nbrLines = ReadLineAsInt(); SkipLines(nbrLines); } if (GameVars.Emulation == EmulationMode.Demo) { if (i != 0 && i != 16 && i != 12 && i != 22 && i != 19 && i != 7) { continue; } } else if (GameVars.Emulation == EmulationMode.SplatPackDemo) { if (i != 0 && i != 28 && i != 14 && i != 23 && i != 8 && i != 5) { continue; } } Opponents.Add(opp); } CloseFile(); }
private OpponentsFile() : base(GameVars.BasePath + "opponent.txt") { Opponents = new List<OpponentInfo>(); int nbrOpponents = ReadLineAsInt(); for (int i = 0; i < nbrOpponents; i++) { OpponentInfo opp = new OpponentInfo(); opp.Name = ReadLine(); SkipLines(1); //short name, race # int raceNumber = ReadLineAsInt(); opp.StrengthRating = ReadLineAsInt(); SkipLines(1); if (GameVars.Emulation != EmulationMode.Demo) SkipLines(1); opp.FileName = ReadLine(); SkipLines(1); //fli int nbrTextChunks = ReadLineAsInt(); for (int j = 0; j < nbrTextChunks; j++) { SkipLines(2); int nbrLines = ReadLineAsInt(); SkipLines(nbrLines); } if (GameVars.Emulation == EmulationMode.Demo) { if (i != 0 && i != 16 && i != 12 && i != 22 && i != 19 && i != 7) continue; } else if (GameVars.Emulation == EmulationMode.SplatPackDemo) { if (i != 0 && i != 28 && i != 14 && i != 23 && i != 8 && i != 5) continue; } Opponents.Add(opp); } CloseFile(); }
public CarModelMenuOption(BasicEffect2 effect, OpponentInfo info) { _effect = effect; _info = info; }