예제 #1
0
 private void InitializeArenaInfos()
 {
     int[,] array = new int[this.arenasCount * this.arenaStages, 2];
     CsvLoader.SplitText <int>(this.csvData, ',', ref array);
     int[,] item     = new int[this.arenaStages, 2];
     item[0, 0]      = array[0, 0];
     item[0, 1]      = array[0, 1];
     this.arenaInfos = new List <int[, ]>();
     for (int i = 1; i < array.GetLength(0); i++)
     {
         if ((i % 4) == 0)
         {
             this.arenaInfos.Add(item);
             item       = new int[this.arenaStages, 2];
             item[0, 0] = array[i, 0];
             item[0, 1] = array[i, 1];
         }
         else
         {
             int num2 = i % 4;
             item[num2, 0] = array[i, 0];
             item[num2, 1] = array[i, 1];
         }
     }
     this.arenaInfos.Add(item);
 }
예제 #2
0
 private void FillSurvivorLevels()
 {
     int[,] array       = new int[this.survivors.Count, playerData.survivorMaxLevel];
     float[,] numArray2 = new float[playerData.survivorMaxLevel, this.survivors.Count];
     float[,] numArray3 = new float[playerData.survivorMaxLevel, this.survivors.Count];
     CsvLoader.SplitText <int>(this.survivorLevels, ',', ref array);
     CsvLoader.SplitText <float>(this.survivorPowers, ',', ref numArray2);
     CsvLoader.SplitText <float>(this.survivorDamage, ',', ref numArray3);
     int[] numArray4 = new int[] { 0, 1, 2, 3, 4, 6, 8, 5, 7 };
     for (int i = 0; i < this.survivors.Count; i++)
     {
         for (int j = 0; j < array.GetLength(1); j++)
         {
             Survivors.SurvivorLevels item = new Survivors.SurvivorLevels {
                 damage = numArray3[j, i],
                 cost   = array[i, j],
                 power  = numArray2[j, i]
             };
             this.survivors[numArray4[i]].levels.Add(item);
         }
     }
 }