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)); } }
public void Awake(AtsSimulationEnvironment environment) { }
public static bool IsTriggeredKey(this AtsSimulationEnvironment self, AtsKey keyType) { return(self.CurrentKeyStates[keyType].IsDown && self.LastKeyStates[keyType].IsUp); }
public static bool IsPressedKey(this AtsSimulationEnvironment self, AtsKey keyType) { return(self.CurrentKeyStates[keyType].IsDown); }