Exemple #1
0
 public override void Update(float dt)
 {
     if (checkpoint?.workable == null || reactorNavigator == null)
     {
         Cleanup();
     }
     else
     {
         reactorNavigator.AdvancePath(false);
         if (!reactorNavigator.path.IsValid() || !MustStop(reactor,
                                                           reactorNavigator.GetNextTransition().x))
         {
             Cleanup();
         }
     }
 }
Exemple #2
0
 public override void Update(float dt)
 {
     if ((UnityEngine.Object)checkpoint == (UnityEngine.Object)null || !checkpoint.RedLight || (UnityEngine.Object)reactor_navigator == (UnityEngine.Object)null)
     {
         Cleanup();
     }
     else
     {
         reactor_navigator.AdvancePath(false);
         if (!reactor_navigator.path.IsValid())
         {
             Cleanup();
         }
         else
         {
             NavGrid.Transition nextTransition = reactor_navigator.GetNextTransition();
             if (!((!rotated) ? (nextTransition.x > 0) : (nextTransition.x < 0)))
             {
                 Cleanup();
             }
         }
     }
 }