public void Update(float step) { current_node = current_node.Transition( current_node.IfNotNull(n => n.Update(step)), n => n.Resume(), n => n.Suspend() ); }
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); }
public AIMorpher(AIMorpherNode n) { current_node = n; current_node.IfNotNull(z => z.Resume()); }