Example #1
0
        public void FixedUpdate()
        {
            // is the ui drawn? if so, update all other pms
            if (API_UI.ApiUICanvas != null)
            {
                uiOpen = true;
            }
            else
            {
                return;
            }

            uiSliderValue = API_UI.SliderPos();

            API_UI.UpdateText(uiSliderValue.ToString());
        }
Example #2
0
 public override void OnStart(StartState state)
 {
     // Create a callback so clicking the toggle opens the main UI
     Fields[nameof(uiOpen)].uiControlFlight.onFieldChanged =
         delegate(BaseField a, System.Object b)
     {
         if (API_UI.ApiUICanvas == null)
         {
             API_UI.ShowUI();
         }
         else
         {
             API_UI.Destroy(API_UI.ApiUICanvas);
         }
     };
 }