Beispiel #1
0
        public static void UpdateVelocityFromDeltaLocation(this AtsSimulationEnvironment self)
        {
            var deltaLocation = self.CurrentStates.Location - self.LastStates.Location;
            var deltaTime     = (double)(self.CurrentStates.SimulationTime - self.LastStates.SimulationTime);

            if (deltaTime > 0.0)
            {
                var kmph = deltaLocation / deltaTime * 3600.0;
                self.CurrentStates.SetVelocityFromDeltaLocation((float)(kmph));
            }
        }
Beispiel #2
0
 public void Awake(AtsSimulationEnvironment environment)
 {
 }
Beispiel #3
0
 public static bool IsTriggeredKey(this AtsSimulationEnvironment self, AtsKey keyType)
 {
     return(self.CurrentKeyStates[keyType].IsDown && self.LastKeyStates[keyType].IsUp);
 }
Beispiel #4
0
 public static bool IsPressedKey(this AtsSimulationEnvironment self, AtsKey keyType)
 {
     return(self.CurrentKeyStates[keyType].IsDown);
 }