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(); }
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(); }
public override void SetModule(VehicleModule module) { this.module = module as TrailerHitchModule; }