Example #1
0
        public void OnDetach()
        {
            if (resetInputStatesOnDetach)
            {
                vc.input.states.Reset();
            }

            vc.input.autoSettable = false;


            // Lower trailer stand
            if (trailerStand != null)
            {
                trailerStand.SetActive(true);
            }

            // Assume trailer does not have a power source, cut lights.
            vc.effectsManager.lightsManager.Disable();

            _trailerHitch = null;
            vc.Sleep();

            attached = false;

            onDetach.Invoke();
        }
Example #2
0
        public void OnAttach(TrailerHitchModule trailerHitch)
        {
            _trailerHitch = trailerHitch;

            vc.Wake();

            vc.input.autoSettable = false;

            // Raise trailer stand
            if (trailerStand != null)
            {
                trailerStand.SetActive(false);
            }

            attached = true;

            onAttach.Invoke();
        }
Example #3
0
 public override void SetModule(VehicleModule module)
 {
     this.module = module as TrailerHitchModule;
 }