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