Guest User

Untitled

a guest
May 24th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. public NodeState AmIHungry() {
  2. if(...) return NodeState.Success;
  3. else return NodeState.Failure;
  4. }
  5.  
  6. public NodeState DoIHaveFood() {
  7. if(...) return NodeState.Success;
  8. else return NodeState.Failure;
  9. }
  10.  
  11. public NodeState EatFood() {
  12. // do something to reduce food
  13. FunctionToReduceFood();
  14. // then check if this action is success, fail or running
  15. if(...) return NodeState.Running;
  16. else if(...) return NodeState.Success;
  17. else return NodeState.Failure;
  18. }
Add Comment
Please, Sign In to add comment