Exemple #1
0
 public void Update(float step)
 {
     current_node = current_node.Transition(
         current_node.IfNotNull(n => n.Update(step)),
         n => n.Resume(),
         n => n.Suspend()
         );
 }
Exemple #2
0
        public AIMorpherNode Update(float step)
        {
            double        other_interest;
            AIMorpherNode other_node = nodes.FindHighestRated(n => n.Upkeep(step), out other_interest);

            if (other_interest >= Upkeep(step) * 2.0f)
            {
                return(other_node);
            }

            UpdateInternal(current_interest);
            return(this);
        }
Exemple #3
0
 public AIMorpher(AIMorpherNode n)
 {
     current_node = n;
     current_node.IfNotNull(z => z.Resume());
 }