示例#1
0
 /// <summary>
 /// Callback when this instance is destroyed.
 /// </summary>
 public void OnDestroy()
 {
     RenderingManager.RemoveFromPostDrawQueue (0, OnDraw);
     ControlUnlock ();
     if (_instance == this)
         _instance = null;
 }
示例#2
0
 /// <summary>
 /// Awake this instance.
 /// </summary>
 public void Awake()
 {
     if (_instance)
     {
         Destroy(_instance);
     }
     _instance = this;
 }
示例#3
0
 /// <summary>
 /// Callback when this instance is destroyed.
 /// </summary>
 public void OnDestroy()
 {
     RenderingManager.RemoveFromPostDrawQueue(0, OnDraw);
     ControlUnlock();
     if (_instance == this)
     {
         _instance = null;
     }
 }
示例#4
0
 /// <summary>
 /// Start this instance.
 /// </summary>
 public void Start()
 {
     if (_instance)
     {
         Destroy(_instance);
     }
     _instance = this;
     _winID    = GUIUtility.GetControlID(FocusType.Passive);
     _UT       = Planetarium.GetUniversalTime();
 }
示例#5
0
        /// <summary>
        /// Callback when this instance is destroyed.
        /// </summary>
        public void OnDestroy()
        {
            ControlUnlock();

            PluginConfiguration config = PluginConfiguration.CreateForType <KartographSettings> ();

            config.load();
            config.SetValue("WarpToWindowPos", _windowPos);
            config.save();

            GameEvents.onHideUI.Remove(Hide);
            GameEvents.onShowUI.Remove(UnHide);
            GameEvents.onGamePause.Remove(Hide);
            GameEvents.onGameUnpause.Remove(UnHide);

            if (_instance == this)
            {
                _instance = null;
            }
        }
示例#6
0
 /// <summary>
 /// Start this instance.
 /// </summary>
 public void Start()
 {
     if (_instance)
         Destroy (_instance);
     _instance = this;
     _winID = GUIUtility.GetControlID (FocusType.Passive);
     _UT = Planetarium.GetUniversalTime ();
 }