示例#1
0
 protected virtual void ActionInput()
 {
     if (!Game.GameActive)
     {
         return;
     }
     if (UIRadialMenu.Active)
     {
         for (int i = 0; i < _numericKeys.Length; i++)
         {
             if (Input.GetKeyDown(_numericKeys[i]))
             {
                 UIRadialMenu.Confirm(i);
             }
         }
         return;
     }
     if (InputSystem.GetButtonDown(BaseControls.Use))
     {
         if (!WorldControlMonitor.Use())
         {
             UICenterButton.TryClickEvent();
         }
     }
 }
示例#2
0
 public override void Init(UIRadialMenu radialMenu, float targetAngle)
 {
     base.Init(radialMenu, targetAngle);
     ClearList();
     Radial.SetCenterText(Description);
     Populate(targetAngle);
     _cursorOffset = _elementAngleDeg / 2.0f;
     TransitionSetup(true);
 }
示例#3
0
 public void AssignParent(UIRadialMenu menu, int index, MenuAction menuAction)
 {
     //_parentRm = menu;
     //_assignedIndex = index;
     _label = menuAction.Description;
     if (menuAction.Icon != null)
     {
         _icon.overrideSprite = menuAction.Icon;
         _textLabel.gameObject.SetActive(false);
         _icon.gameObject.SetActive(true);
     }
     else
     {
         _textLabel.text = _label;
         _textLabel.gameObject.SetActive(true);
         _icon.gameObject.SetActive(false);
     }
     _cg.blocksRaycasts = false;
     SetAlpha(0);
     ResetScale();
 }
示例#4
0
 void Awake()
 {
     _main          = this;
     PanelTransform = transform as RectTransform;
 }