Пример #1
0
        private static AtsHandles Elapse(AtsVehicleState vehicleState, IntPtr panel, IntPtr sound)
        {
            AtsSimulationEnvironment.Instance.OnUpdate(out var vehicleOperations, vehicleState, panel, sound);


            return(vehicleOperations);
        }
Пример #2
0
        internal void OnUpdate(out AtsHandles vehicleOperations, AtsVehicleState vehicleState, IntPtr panelArray, IntPtr soundArray)
        {
            PanelOperations.SetSource(panelArray);
            SoundOperations.SetSource(soundArray);

            LastStates.CopyFrom(CurrentStates);
            if (WasJustInitialized)
            {
                LastStates.SetVehicleState(vehicleState);
            }

            CurrentStates.SetVehicleState(vehicleState);

            this.UpdateVelocityFromDeltaLocation();


            ControlHandle.Update();


            foreach (var behaviour in BehaviourArray)
            {
                behaviour.Update();
            }

            LastKeyStates.CopyFrom(CurrentKeyStates);

            vehicleOperations = ControlHandle.Operation;

            WasJustInitialized = false;
        }
Пример #3
0
        internal void OnUpdate(out AtsHandles vehicleOperations, AtsVehicleState vehicleState, IntPtr panelArray, IntPtr soundArray)
        {
            PanelOperations.SetSource(panelArray);
            SoundOperations.SetSource(soundArray);

            LastStates.CopyFrom(CurrentStates);
            CurrentStates.SetVehicleState(vehicleState);

            foreach (IAtsBehaviour behaviour in Behaviours)
            {
                behaviour.Update();
            }

            LastKeyStates.CopyFrom(CurrentKeyStates);

            vehicleOperations = ControlHandle.Handles;
        }
Пример #4
0
 internal void CopyFrom(AtsSimulationStates source)
 {
     _vehicleState = source._vehicleState;
     _doorState    = source._doorState;
 }
Пример #5
0
 internal void SetVehicleState(AtsVehicleState vehicleState)
 {
     _vehicleState = vehicleState;
 }