chenxin
2020-11-09 172d8ffbf5fe3bdd60b3d71a3a60feeed1cb1762
Assets/Scripts/TowerDefense/UI/EndlessBossSkill/BossSkillShieldWall.cs
@@ -1,4 +1,6 @@
using System.Collections.Generic;
using UnityEngine;
using TowerDefense.Agents;
/**
 * 魔法护盾
@@ -16,18 +18,30 @@
        /// </summary>
        public override void ReleaseSkill()
        {
            base.ReleaseSkill();
            List<int> tunelIdList = GetTunelList();
            if (tunelIdList.Count > 0)
            {
                for (int i = 0; i < tunelIdList.Count; ++i)
                {
                    List<Agent> agents = AgentInsManager.instance.GetAgentsByTunel(tunelIdList[i]);
                    if (agents == null) continue;
                    for (int j = 0; j < agents.Count; ++j)
                    {
                        float shieldValue = agents[j].configuration.currentHealth * SkillData.effect[0];
                        agents[j].configuration.AddShieldWall(shieldValue, SkillData.effect[1]);
                    }
                }
            }
        }
        public override void Init()
        {
            base.Init();
            Debug.Log("--------------------- 魔法护盾技能初始化 ---------------------");
        }
        public override void Update(float deltaTime)
        {
            IsCDCompleted = false;
        }
    }
}