|
|
@@ -248,6 +248,7 @@ public class EnemyCreater : MonoBehaviour
|
|
|
{
|
|
|
soldierRank.Add(SoldierEXP.expInstance.ssexp[i].level);
|
|
|
}
|
|
|
+ //µÈ¼¶¸ßµÄÔÚǰ
|
|
|
List<List<int>> idSort = new List<List<int>>();
|
|
|
if (soldierRank[0] == soldierRank[1])
|
|
|
{
|
|
|
@@ -295,53 +296,32 @@ public class EnemyCreater : MonoBehaviour
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
- List<int> idList = new List<int> { 6,4,1 };
|
|
|
- int x0 = -1;
|
|
|
- int x1 = -1;
|
|
|
switch (idSort.Count)
|
|
|
{
|
|
|
case 1:
|
|
|
- levelTypes[id] = Random.Range(1, 9);
|
|
|
+ levelTypes[id] = Random.Range(1, 6);
|
|
|
break;
|
|
|
case 2:
|
|
|
switch (idSort[id].Count)
|
|
|
{
|
|
|
case 1:
|
|
|
- levelTypes[id] = idList[idSort[id][0]];
|
|
|
+ levelTypes[id] = GetLevelTypes(idSort[id][0]);
|
|
|
break;
|
|
|
case 2:
|
|
|
- x0 = idSort[id][0];
|
|
|
- x1 = idSort[id][1];
|
|
|
- if(x0 == 0 && x1 == 2)
|
|
|
- {
|
|
|
- levelTypes[id] = Random.Range(7, 9);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- levelTypes[id] = Random.Range(idList[x1] + 1, idList[x0]);
|
|
|
- }
|
|
|
+ levelTypes[id] = (GetLevelTypes(idSort[id][0]) + GetLevelTypes(idSort[id][1])) / 2;
|
|
|
+ if (levelTypes[id] == 3) levelTypes[id] = 6;
|
|
|
break;
|
|
|
}
|
|
|
break;
|
|
|
case 3:
|
|
|
- x0 = Mathf.Min(idSort[0 + id * 2][0], idSort[1][0]);
|
|
|
- x1 = Mathf.Max(idSort[0 + id * 2][0], idSort[1][0]);
|
|
|
- if (x0 == 0 && x1 == 2)
|
|
|
- {
|
|
|
- levelTypes[id] = Random.Range(7, 9);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- levelTypes[id] = Random.Range(idList[x1] + 1, idList[x0]);
|
|
|
- }
|
|
|
+ levelTypes[id] = GetLevelTypes(idSort[id * 2][0]);
|
|
|
break;
|
|
|
}
|
|
|
- if (id == 1 && levelTypes[1] == levelTypes[0])
|
|
|
- {
|
|
|
- GetLevelOrientation(1);
|
|
|
- }
|
|
|
+ }
|
|
|
+
|
|
|
+ public int GetLevelTypes(int id)
|
|
|
+ {
|
|
|
+ return id * 2 + 1;
|
|
|
}
|
|
|
|
|
|
public void OnGameTimeChange(float gameTime)
|