| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 根据赛道获得该赛道的所有敌人 |
| | | /// </summary> |
| | | /// <param name="tunel">赛道id (1~5)</param> |
| | | /// <param name="isOppo">是否是对手的赛道</param> |
| | | /// <returns></returns> |
| | | public List<Agent> GetAgentsByTunel(int tunel, bool isOppo = false) |
| | | { |
| | | WaveLineAgentInsMgr[] waveLineAgents = isOppo ? getOppoWaveLineList() : GetWaveLineList(); |
| | | List<Agent> ret = new List<Agent>(); |
| | | |
| | | for (int i = 0; i < waveLineAgents.Length; ++i) |
| | | { |
| | | if (i == tunel - 1) |
| | | { |
| | | for (int j = 0; j < waveLineAgents[i].listAgent.Count; ++j) |
| | | { |
| | | if (waveLineAgents[i].listAgent[j].AgentType == SpawnAgentType.Normal) |
| | | ret.Add(waveLineAgents[i].listAgent[j]); |
| | | } |
| | | |
| | | return ret; |
| | | } |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | |
| | | public List<Agent> agentList |
| | | { |
| | | get { return this.agentInsList; } |