protected MyBehaviorTreeState IsTrue([BTIn] ref MyBBMemoryBool variable) { if ((variable == null) || !variable.BoolValue) { return(MyBehaviorTreeState.FAILURE); } return(MyBehaviorTreeState.SUCCESS); }
protected MyBehaviorTreeState SetBoolean([BTOut] ref MyBBMemoryBool variable, [BTParam] bool value) { if (variable == null) { variable = new MyBBMemoryBool(); } variable.BoolValue = value; return(MyBehaviorTreeState.SUCCESS); }
protected MyBehaviorTreeState IsFalse([BTIn] ref MyBBMemoryBool variable) { return((variable == null || variable.BoolValue) ? MyBehaviorTreeState.FAILURE : MyBehaviorTreeState.SUCCESS); }
protected MyBehaviorTreeState IsTrue([BTIn] ref MyBBMemoryBool variable) { return((variable != null && variable.BoolValue) ? MyBehaviorTreeState.SUCCESS : MyBehaviorTreeState.FAILURE); }