From d35d31d85fd4b827dc37008aef39c019b6a7781d Mon Sep 17 00:00:00 2001 From: chenxin <chenxin6991@163.com> Date: Sat, 07 Nov 2020 16:34:50 +0800 Subject: [PATCH] Merge commit '2940e451058b1af7541ff651f485f33a10e92f7e' into master --- Assets/Scripts/TowerDefense/UI/EndlessBossSkill/BossSkillBubbleBomb.cs | 46 ++++++---------------------------------------- 1 files changed, 6 insertions(+), 40 deletions(-) diff --git a/Assets/Scripts/TowerDefense/UI/EndlessBossSkill/BossSkillBubbleBomb.cs b/Assets/Scripts/TowerDefense/UI/EndlessBossSkill/BossSkillBubbleBomb.cs index c459c66..bf9d957 100644 --- a/Assets/Scripts/TowerDefense/UI/EndlessBossSkill/BossSkillBubbleBomb.cs +++ b/Assets/Scripts/TowerDefense/UI/EndlessBossSkill/BossSkillBubbleBomb.cs @@ -12,6 +12,9 @@ */ namespace KTGMGemClient { + /// <summary> + /// 泡泡炸弹配置数据 + /// </summary> public class BubbleBombConfig { public BubbleBombAgent Agent { get; set; } @@ -81,10 +84,7 @@ public class BossSkillBubbleBomb : EndlessBossSkill { - public BossSkillBubbleBomb(boss_skill param) : base(param) - { - random = new System.Random(); - } + public BossSkillBubbleBomb(boss_skill param) : base(param) { } /// <summary> /// 被攻击的次数 @@ -97,8 +97,6 @@ /// 所有存在于场景中的泡泡炸弹 /// </summary> protected List<BubbleBombConfig> bubbleBombList; - - protected System.Random random; /// <summary> /// 泡泡炸弹对象池 @@ -118,7 +116,6 @@ { base.ReleaseSkill(); Debug.Log("--------------------- 泡泡炸弹释放 ---------------------"); - // cx test SpawnBubbleBomb(); } @@ -159,6 +156,7 @@ bubbleBomb.AgentType = SpawnAgentType.BubbleBomb; bubbleBomb.opponentAgent = false; bubbleBomb.Reset(); + bubbleBomb.Initialize(); // 出生位置 Vector3 spawnPosition = EndlessLevelManager.instance.GetTunelWorldPosition(tunelIdList[i], (EndlessBossSkillTunelType)SkillData.target[1]); @@ -176,39 +174,6 @@ config.MoveSpeed = SkillData.effect[1]; bubbleBombList.Add(config); } - } - - /// <summary> - /// 获取赛道列表 - /// </summary> - protected List<int> GetTunelList() - { - List<int> tunelIdList = new List<int>(); - int count = 0; - // 剩余没有用到的赛道 - List<int> remainList = new List<int>() { 1, 2, 3, 4, 5 }; - - for (int i = 0; i < SkillData.tunnel.Count; ++i) - { - // 统计6这种类型的数量 - if (SkillData.tunnel[i] == 6) - { - ++count; - continue; - } - - tunelIdList.Add(SkillData.tunnel[i]); - remainList.Remove(SkillData.tunnel[i]); - } - - for (int i = 0; i < count; ++i) - { - int num = random.Next(remainList.Count); - tunelIdList.Add(remainList[num]); - remainList.Remove(remainList[num]); - } - - return tunelIdList; } public override void Reset() @@ -338,6 +303,7 @@ if (config.Agent.bInDeathState) return; ++config.AttackCount; + Debug.Log($"--------------------- BubbleBombAgent Id: {id}, AttackCount:{config.AttackCount} ---------------------"); if (config.AttackCount >= config.NeedAttackCount) AgentDead(config); -- Gitblit v1.9.1