Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public NodeState AmIHungry() {
- if(...) return NodeState.Success;
- else return NodeState.Failure;
- }
- public NodeState DoIHaveFood() {
- if(...) return NodeState.Success;
- else return NodeState.Failure;
- }
- public NodeState EatFood() {
- // do something to reduce food
- FunctionToReduceFood();
- // then check if this action is success, fail or running
- if(...) return NodeState.Running;
- else if(...) return NodeState.Success;
- else return NodeState.Failure;
- }
Add Comment
Please, Sign In to add comment