// Update is called once per frame void Update() { if (root != null) { root.Execute(); } }
// Update is called once per frame void Update() { items.text = "Apple: " + apple + " Orange:" + orange + " Banana:" + banana + " SmoothieM:" + smoothie1; if (root != null) { root.Execute(); } }
public override Status Execute() { if (lastResult != Status.Running) { node.Reset(); } var ret = lastResult = node.Execute(); return(ret != Status.Running ? Status.Success : Status.Running); }
public override Status Execute() { if (lastResult != Status.Running) { node.Reset(); } var ret = lastResult = node.Execute(); if (ret == Status.Failure) { ret = Status.Success; } else if (ret == Status.Success) { ret = Status.Failure; } return(ret); }
public Status Execute() { return(root.Execute()); }