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