public void excAction(m_fight_attack_toc fightVO, Animal src, Animal[] dests, bool isSelf) { float curTime = Time.time; updateFightUnitPos(src,fightVO); if (src != null) { if (src is Monster) { //(src as Monster).delayAttackKey = LoopManager.setTimeout(attack, actionVO.delay * 33, [src, actionVO.type, fightVO.dir, fightVO.skillid, fightVO.target_id, isSelf]); } else { string type = "attack"; attack(src, type, fightVO.dir, fightVO.skillid, fightVO.target_id, isSelf); } } }
public static Animal[] getDest(m_fight_attack_toc fightVO) { Animal[] dests = new Animal[fightVO.result.Length]; p_attack_result result; Animal dest; int leftHP; for (int i = fightVO.result.Length - 1; i >= 0; i--) { result = fightVO.result[i] as p_attack_result; dest = SceneUnitMgr.getUnit(result.dest_id) as Animal; if (dest != null) { dests[i] = dest; } } return dests; }
private void attack(Animal tar,string attType,int dir,int skill,double targetID,bool needShake = true) { tar.attack(attType, dir); }