public override bool JudgeCondition(Brain brain) { // 判断在攻击范围内是否有目标 return(false); }
public override BattleFieldEvent TryCreateAction(Brain brain) { return(null); }
public override bool Do(Brain brain) { return(conditionDescriptor.JudgeCondition(brain)); }
public void MakeDecision(Brain brain) { bool ret = root.Do(brain); UtilityHelper.Log("tree ret = " + ret); }
public abstract bool JudgeCondition(Brain brain);
public void InitWithBrain(Brain brain) { // 对brain对数据 添加监听 // 需要解决对问题: 先创建strategy 后在brain中添加relation 这些事件如何绑定 }
public abstract BattleFieldEvent TryCreateAction(Brain brain);
public void OnExit(Brain brain) { }
public void OnEnter(Brain brain) { }
public void OnUpdate(Brain brain) { decisionTree.MakeDecision(brain); }