chenxin
2020-11-04 ce7efae14eb31bcdfa0d540da6a1ef1457e046ab
Assets/Scripts/TowerDefense/Level/AgentInsManager.cs
@@ -61,7 +61,15 @@
    /// <returns></returns>
    public int getAgentInsNum()
    {
        return this.agentInsList.Count;
        int ret = 0;
        for (int i = 0; i < agentInsList.Count; ++i)
        {
            if (agentInsList[i].AgentType == SpawnAgentType.Normal)
                ++ret;
        }
        return ret;
    }
    /// <summary>
@@ -640,12 +648,25 @@
        if (slinfo.atcmod.Count < 2) return;
        float radius = slinfo.atcmod[1];
        for (int ti = 0; ti < mgrList.Length; ti++)
        {
            WaveLineAgentInsMgr mgr = mgrList[ti];
            for (int idx = 0; idx < mgr.listAgent.Count; idx++)
            {
                Agent eag = mgr.listAgent[idx];
                if (eag.AgentType == SpawnAgentType.BubbleBomb)
                {
                    buffinfo bufdata = JsonDataCenter.GetBuffFromId(3);
                    if (bufdata != null)
                    {
                        if (bufdata.buff_func[0] == 3)
                            EventCenter.Ins.BroadCast((int)KTGMGemClient.EventType.EndlessBubbleBombBeDizzinessed, (eag as BubbleBombAgent).Id, bufdata.last);
                    }
                }
                else
                {
                Vector3 fpos = eag.transform.position;
                fpos.y = 0;
                float dist = Vector3.Distance(fpos, pos);
@@ -669,6 +690,7 @@
                    continue;
                else
                    eag.SetAgentBuffEffect(3);
                }
            }
        }
@@ -697,10 +719,17 @@
            wavelineIns = agentWaveLineArray[waveline];
        if (wavelineIns == null) return;
        List<Agent> listAg = wavelineIns.listAgent;
        for (int ti = listAg.Count - 1; ti >= 0; ti--)
        {
            Agent eag = listAg[ti];
            if (eag.AgentType == SpawnAgentType.BubbleBomb)
                EventCenter.Ins.BroadCast((int)KTGMGemClient.EventType.EndlessFireSkillKillBubbleBomb, (eag as BubbleBombAgent).Id);
            else
            {
            Vector3 fpos = eag.transform.position;
            float damage = slinfo.skilleffect[2];
            damage += (slinfo.skilleffect[1] / 100.0f * eag.configuration.maxHealth);
@@ -715,7 +744,7 @@
                    EndlessGameUI.instance.generateBloodText(fpos, damage, false, false);
            }
        }
        }
    }
    /// <summary>