/// <summary>Updates stuck detector.</summary>
 private void UpdateStuckDetector(ActionSet actionSet)
 {
     if (!TrackTimeSinceLastNode)
     {
         return;                          // Do nothing if TrackTimeSinceLastNode is set to false.
     }
     actionSet.AddAction(TimeSinceLastNode.SetVariable(new V_TotalTimeElapsed()));
     actionSet.AddAction(DistanceToNextNode.SetVariable(Element.Part <V_DistanceBetween>(Element.Part <V_PositionOf>(new V_EventPlayer()), CurrentPositionWithDestination())));
 }
Esempio n. 2
0
 /// <summary>Updates stuck detector.</summary>
 private void UpdateStuckDetector(ActionSet actionSet, Element player)
 {
     if (!TrackTimeSinceLastNode)
     {
         return;                          // Do nothing if TrackTimeSinceLastNode is set to false.
     }
     actionSet.AddAction(TimeSinceLastNode.SetVariable(Part("Total Time Elapsed"), targetPlayer: player));
     actionSet.AddAction(DistanceToNextNode.SetVariable(DistanceBetween(PositionOf(player), CurrentPositionWithDestination(player)), targetPlayer: player));
 }