Example #1
0
 //executes the behavior for single-target rewinding. If the player pauses a new thing, the old thing will unpause.
 void SingleSelect(RewindOverseer o)
 {
     if (currentTarget == o)                                                         //if the object is already the selected object...
     {
         currentTarget.SetTimeControl(!currentTarget.IsRewinding());                 //toggle whether the object is rewinding.
     }
     else                                                                            //otherwise...
     {
         if (currentTarget != null)
         {
             currentTarget.SetTimeControl(false);                                                    //stop the old target rewinding,
         }
         currentTarget = o;                                                                          //set a new target,
         currentTarget.SetTimeControl(true);                                                         //begin rewinding the new target.
     }
 }
Example #2
0
 /*
  * executes the behavior for multi-target rewinding. If the player pauses a new thing, the old thing will
  * remain paused until the player selects it again and then right-clicks it once more.
  */
 void MultiSelect(RewindOverseer o)
 {
     if (currentTarget == o)
     {
         currentTarget.SetTimeControl(!currentTarget.IsRewinding());
     }
     else
     {
         currentTarget = o;
         currentTarget.SetTimeControl(true);
     }
 }
Example #3
0
 void UnpauseObject(RewindOverseer o)
 {
     o.SetTimeControl(false);
 }
Example #4
0
 void PauseObject(RewindOverseer o)
 {
     o.SetTimeControl(true);
 }