| | |
| | | isWaveStoped = false; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Handles spawning the current agent and sets up the next agent for spawning |
| | | /// 在场景内孵化出来一个Boss,这个核心函数最后被规则性的数据接管 |
| | | /// </summary> |
| | | protected virtual void SpawnCurrent() |
| | | { |
| | | if (isWaveStoped) return; |
| | |
| | | else |
| | | { |
| | | ++spawnedEnemies; |
| | | |
| | | if (SpawnNewAgent != null) |
| | | SpawnNewAgent(); |
| | | |
| | | if (spawnedEnemies >= waveData.Config.amount) |
| | | { |
| | | StopWave(); |
| | | SafelyBroadcastWaveCompletedEvent(); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | newAgent.healthBar.SetHealthLevel(1); |
| | | // 加入Manager统一管理. |
| | | AgentInsManager.instance.addAgent(newAgent); |
| | | |
| | | |
| | | if (isDouble) |
| | | { |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 暂时先这么处理 |
| | | /// 暂时先这么处理 cx test |
| | | /// </summary> |
| | | /// <param name="resId">endless_enemy表的资源id</param> |
| | | /// <returns>所有可选的agent列表的索引</returns> |