public void UpdateTriggeredCallBacks() { if (!battlePlayerCtr.isInFight) { return; } battlePlayerCtr.ClearAllSkillCallBacks(); battleMonsterCtr.ClearAllSkillCallBacks(); // 初始化人物被动技能 for (int i = 0; i < (battlePlayerCtr.agent as Player).attachedTriggeredSkills.Count; i++) { Skill skill = (battlePlayerCtr.agent as Player).attachedTriggeredSkills [i]; skill.AffectAgents(battlePlayerCtr, battleMonsterCtr); } // 初始化怪物被动技能 for (int i = 0; i < (battleMonsterCtr.agent as Monster).attachedTriggeredSkills.Count; i++) { Skill skill = (battleMonsterCtr.agent as Monster).attachedTriggeredSkills [i]; skill.AffectAgents(battleMonsterCtr, battlePlayerCtr); } }