| | |
| | | /// <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> |
| | |
| | | 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]; |
| | | Vector3 fpos = eag.transform.position; |
| | | fpos.y = 0; |
| | | float dist = Vector3.Distance(fpos, pos); |
| | | if (radius < dist) |
| | | continue; |
| | | |
| | | float damage = slinfo.skilleffect[2]; |
| | | damage += (slinfo.skilleffect[1] / 100.0f * eag.configuration.maxHealth); |
| | | damage = (float)Math.Floor(damage); |
| | | |
| | | eag.TakeDamage(damage, fpos, null); |
| | | if (!eag.opponentAgent) |
| | | if (eag.AgentType == SpawnAgentType.BubbleBomb) |
| | | { |
| | | if (GameUI.instanceExists) |
| | | GameUI.instance.generateBloodText(fpos, damage, false, false); |
| | | else if (EndlessGameUI.instanceExists) |
| | | EndlessGameUI.instance.generateBloodText(fpos, damage, false, false); |
| | | 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); |
| | | } |
| | | } |
| | | |
| | | if (eag.isDead) |
| | | continue; |
| | | else |
| | | eag.SetAgentBuffEffect(3); |
| | | { |
| | | Vector3 fpos = eag.transform.position; |
| | | fpos.y = 0; |
| | | float dist = Vector3.Distance(fpos, pos); |
| | | if (radius < dist) |
| | | continue; |
| | | |
| | | float damage = slinfo.skilleffect[2]; |
| | | damage += (slinfo.skilleffect[1] / 100.0f * eag.configuration.maxHealth); |
| | | damage = (float)Math.Floor(damage); |
| | | |
| | | eag.TakeDamage(damage, fpos, null); |
| | | if (!eag.opponentAgent) |
| | | { |
| | | if (GameUI.instanceExists) |
| | | GameUI.instance.generateBloodText(fpos, damage, false, false); |
| | | else if (EndlessGameUI.instanceExists) |
| | | EndlessGameUI.instance.generateBloodText(fpos, damage, false, false); |
| | | } |
| | | |
| | | if (eag.isDead) |
| | | continue; |
| | | else |
| | | eag.SetAgentBuffEffect(3); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | 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]; |
| | | Vector3 fpos = eag.transform.position; |
| | | float damage = slinfo.skilleffect[2]; |
| | | damage += (slinfo.skilleffect[1] / 100.0f * eag.configuration.maxHealth); |
| | | damage = (float)Math.Floor(damage); |
| | | |
| | | eag.TakeDamage(damage, fpos, null); |
| | | if (!eag.opponentAgent) |
| | | if (eag.AgentType == SpawnAgentType.BubbleBomb) |
| | | EventCenter.Ins.BroadCast((int)KTGMGemClient.EventType.EndlessFireSkillKillBubbleBomb, (eag as BubbleBombAgent).Id); |
| | | else |
| | | { |
| | | if (GameUI.instanceExists) |
| | | GameUI.instance.generateBloodText(fpos, damage, false, false); |
| | | else if (EndlessGameUI.instanceExists) |
| | | EndlessGameUI.instance.generateBloodText(fpos, damage, false, false); |
| | | Vector3 fpos = eag.transform.position; |
| | | float damage = slinfo.skilleffect[2]; |
| | | damage += (slinfo.skilleffect[1] / 100.0f * eag.configuration.maxHealth); |
| | | damage = (float)Math.Floor(damage); |
| | | |
| | | eag.TakeDamage(damage, fpos, null); |
| | | if (!eag.opponentAgent) |
| | | { |
| | | if (GameUI.instanceExists) |
| | | GameUI.instance.generateBloodText(fpos, damage, false, false); |
| | | else if (EndlessGameUI.instanceExists) |
| | | EndlessGameUI.instance.generateBloodText(fpos, damage, false, false); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |