public bool CheckGoal(TargetType target, RoundGoalType type, RoundGoalCondition func, ref RoleProperty role, ref RoleProperty Npc, int Values) { int n = (int)type; int m = (int)func; if (GoalCheckFuncDict[n, m] == null) { Debug.LogError("方法没有注册"); return(false); } if (target == TargetType.Self) { return(GoalCheckFuncDict[n, m](ref role, ref Npc, Values)); } if (target == TargetType.Enemy) { return(GoalCheckFuncDict[n, m](ref Npc, ref role, Values)); } if (target == TargetType.All) { bool va = GoalCheckFuncDict[n, m](ref role, ref Npc, Values); bool vb = GoalCheckFuncDict[n, m](ref Npc, ref role, Values); return(va && vb); } return(false); }
public void REGGoalCheck(RoundGoalType type, RoundGoalCondition func, GoalCaculateFunc cf) { int n = (int)type; int m = (int)func; GoalCheckFuncDict[n, m] = cf; }