Beispiel #1
0
 public override bool Interactible(MemberInfo member, GameParameters parameters)
 {
     if (changeHotkey)
     {
         // Use MapView.MapCamera to get a gameObject
         HangerExtenderSelectHotKey gui = MapView.MapCamera.gameObject.GetComponent <HangerExtenderSelectHotKey>();
         if (gui == null)
         {
             gui = MapView.MapCamera.gameObject.AddComponent <HangerExtenderSelectHotKey>();
         }
         if (HangerExtenderSelectHotKey.Instance != null)
         {
             if (HangerExtenderSelectHotKey.Instance.completed)
             {
                 changeHotkey = false;
                 HangerExtenderSelectHotKey.Instance.EnableWindow(false);
                 newHotKey = HangerExtenderSelectHotKey.Instance.hotkey;
                 UnityEngine.Object.Destroy(gui);
                 gui = null;
                 HangerExtenderSelectHotKey.Instance = null;
             }
             else
             {
                 HangerExtenderSelectHotKey.Instance.lastTimeTic = Time.realtimeSinceStartup;
                 if (!HangerExtenderSelectHotKey.Instance.active)
                 {
                     HangerExtenderSelectHotKey.Instance.EnableWindow();
                     HangerExtenderSelectHotKey.Instance.hotkey = newHotKey;
                 }
             }
         }
     }
     return(true);
 }
Beispiel #2
0
 void Start()
 {
     Instance = this;
 }