| | |
| | | if (config.IsAttackDeath || config.IsArrived) return; |
| | | |
| | | ++config.AttackCount; |
| | | Debug.Log($"---- BubbleBombAgent Id: {id}, AttackCount: {config.AttackCount} ----"); |
| | | // Debug.Log($"---- BubbleBombAgent Id: {id}, AttackCount: {config.AttackCount} ----"); |
| | | |
| | | if (config.AttackCount >= config.NeedAttackCount) |
| | | AgentDead(config); |
| | |
| | | { |
| | | BubbleBombConfig config = bubbleBombList[i]; |
| | | |
| | | if (config.Agent == null || config.obj == null) continue; |
| | | |
| | | // 泡泡炸弹已经触发了攻击,延时一会过后掉爱心 |
| | | if (config.IsAttack) |
| | | { |
| | |
| | | } |
| | | |
| | | // 更新移动 |
| | | if (config.Agent.CanMove) |
| | | if (config.Agent != null && config.Agent.CanMove) |
| | | { |
| | | Vector3 pos = config.obj.transform.position; |
| | | pos.z -= deltaTime * config.MoveSpeed; |
| | |
| | | config.AttackTime = 0.65f; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | // cx test |
| | | Debug.LogError("---- 泡泡炸弹不能移动??? ----"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | protected override List<int> GetTunelList() |
| | | { |
| | | return EndlessPortData.GetAllTunelByLevelWave(EndlessLevelManager.instance.CurrentLevel, EndlessLevelManager.instance.WaveManager.CurrentWaveIndex); |
| | | } |
| | | } |
| | | } |