Ejemplo n.º 1
0
 /// <summary>
 /// Awake this instance.
 /// </summary>
 public void Awake()
 {
     if (_instance)
     {
         Destroy(_instance);
     }
     _instance = this;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Destroy this instance.
        /// </summary>
        public void OnDestroy()
        {
            RenderingManager.RemoveFromPostDrawQueue(0, OnDraw);
            PluginConfiguration config = PluginConfiguration.CreateForType <KartographSettings> ();

            config.load();
            config.SetValue("ManeuverWindowPos", _windowPos);
            config.save();
            if (_instance == this)
            {
                _instance = null;
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Start this instance.
        /// </summary>
        public void Start()
        {
            if (_instance)
            {
                Destroy(_instance);
            }
            _instance   = this;
            _winID      = GUIUtility.GetControlID(FocusType.Passive);
            _savedWinID = GUIUtility.GetControlID(FocusType.Passive);
            Debug.Log("Maneuver Editor Start");
            PluginConfiguration config = PluginConfiguration.CreateForType <KartographSettings> ();

            config.load();
            _windowPos        = config.GetValue <Rect> ("ManeuverWindowPos", new Rect());
            _windowPos.width  = 0.0f;
            _windowPos.height = 0.0f;
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Destroy this instance.
        /// </summary>
        public void OnDestroy()
        {
            ControlUnlock();
            PluginConfiguration config = PluginConfiguration.CreateForType <KartographSettings> ();

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

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

            if (_instance == this)
            {
                _instance = null;
            }
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Destroy this instance.
 /// </summary>
 public void OnDestroy()
 {
     RenderingManager.RemoveFromPostDrawQueue (0, OnDraw);
     PluginConfiguration config = PluginConfiguration.CreateForType<KartographSettings> ();
     config.load ();
     config.SetValue ("ManeuverWindowPos",_windowPos);
     config.save ();
     if (_instance == this)
         _instance = null;
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Start this instance.
 /// </summary>
 public void Start()
 {
     if (_instance)
         Destroy (_instance);
     _instance = this;
     _winID = GUIUtility.GetControlID (FocusType.Passive);
     _savedWinID = GUIUtility.GetControlID (FocusType.Passive);
     Debug.Log ("Maneuver Editor Start");
     PluginConfiguration config = PluginConfiguration.CreateForType<KartographSettings> ();
     config.load ();
     _windowPos = config.GetValue<Rect> ("ManeuverWindowPos",new Rect());
     _windowPos.width = 0.0f;
     _windowPos.height = 0.0f;
 }