Not.cs 326 B

1234567891011121314151617
  1. using Model;
  2. namespace BehaviorTree
  3. {
  4. [Node(NodeType.Not)]
  5. public class Not: Node
  6. {
  7. public Not(NodeConfig config): base(config)
  8. {
  9. }
  10. public override bool Run(BlackBoard blackBoard)
  11. {
  12. return !this.children[0].Run(blackBoard);
  13. }
  14. }
  15. }