Esempio n. 1
0
        public void Start()
        {
            if (!CompatibilityChecker.IsAllCompatible())
            {
                return;
            }

            GameEvents.onVesselWasModified.Add(OnVesselWasModified);
            GameEvents.onVesselGoOffRails.Add(OnVesselOffRails);
            GameEvents.onVesselGoOnRails.Add(OnVesselOnRails);

            physicsEasingCurve.Add(numTicksForEasing, 1);
            physicsEasingCurve.Add(0, 0);
        }
Esempio n. 2
0
        public void OnDestroy()
        {
            if (!CompatibilityChecker.IsAllCompatible())
            {
                return;
            }

            GameEvents.onVesselWasModified.Remove(OnVesselWasModified);
            GameEvents.onVesselGoOffRails.Remove(OnVesselOffRails);
            GameEvents.onVesselGoOnRails.Remove(OnVesselOnRails);

            if (InputLockManager.GetControlLock("KJRLoadLock") == ControlTypes.ALL_SHIP_CONTROLS)
            {
                InputLockManager.RemoveControlLock("KJRLoadLock");
            }
            updatedVessels          = null;
            vesselOffRailsTick      = null;
            vesselJointStrengthened = null;

            multiJointManager.OnDestroy();
            multiJointManager = null;
        }