Пример #1
0
        public void OnDestroy()
        {
            if (instructor_Werner != null)
            {
                if (instructor_Werner.Instructor != null)
                {
                    Destroy(instructor_Werner.Instructor.gameObject);
                }
                instructor_Werner.Destroy();
            }

            if (instructor_Linus != null)
            {
                if (instructor_Linus.Instructor != null)
                {
                    Destroy(instructor_Linus.Instructor.gameObject);
                }
                instructor_Linus.Destroy();
            }
            GameEvents.onVesselSOIChanged.Remove(onVesselSOIChanged);
            GameEvents.onScreenResolutionModified.Remove(onScreenResolutionModified);
            GameEvents.OnMapEntered.Remove(onMapEntered);
            if (HighLogic.CurrentGame.Mode == Game.Modes.CAREER)
            {
                GameEvents.Contract.onOffered.Remove(CheckContracts);
            }
        }