Beispiel #1
0
 public void Update()
 {
     current_node = current_node.Transition(
         current_node.IfNotNull(n => n.Update()),
         n => n.Resume(),
         n => n.Suspend()
         );
 }
Beispiel #2
0
 static public void InitializeIdle(this AIMachineNode item, params AIMachineTransition[] transitions)
 {
     item.InitializeIdle((IEnumerable <AIMachineTransition>)transitions);
 }
Beispiel #3
0
 public AIMachine(AIMachineNode n)
 {
     current_node = n;
     current_node.IfNotNull(z => z.Resume());
 }
Beispiel #4
0
 static public void Initialize(this AIMachineNode item, Process update, params AIMachineTransition[] transitions)
 {
     item.Initialize(update, (IEnumerable <AIMachineTransition>)transitions);
 }
Beispiel #5
0
 static public void InitializeIdle(this AIMachineNode item, IEnumerable <AIMachineTransition> transitions)
 {
     item.Initialize(new AIMachineBehaviour_Idle(), transitions);
 }
Beispiel #6
0
 static public void Initialize(this AIMachineNode item, Process update, IEnumerable <AIMachineTransition> transitions)
 {
     item.Initialize(new AIMachineBehaviour_Process(update), transitions);
 }
Beispiel #7
0
 public AIMachineTransition(AIMachineNode n) : this(n, new AIMachineCondition_Always())
 {
 }
Beispiel #8
0
 public AIMachineTransition(AIMachineNode n, Operation <bool> p) : this(n, new AIMachineCondition_Predicate(p))
 {
 }
Beispiel #9
0
 public AIMachineTransition(AIMachineNode n, Process r, Process s, Operation <bool> p) : this(n, new AIMachineCondition_Predicate(r, s, p))
 {
 }
Beispiel #10
0
 public AIMachineTransition(AIMachineNode n, AIMachineCondition c)
 {
     node      = n;
     condition = c;
 }