Exemplo n.º 1
0
        void Awake()
        {
            SelectablePanel panel = GetComponent <SelectablePanel>();

            panel.OnFocusEvent += OnFocus;
            panel.OnBlurEvent  += OnBlur;
        }
Exemplo n.º 2
0
 void IPointerDownHandler.OnPointerDown(PointerEventData eventData)
 {
     if (parent == null)
     {
         parent = GetComponentInParent <SelectablePanel>();
     }
     parent.Hide();
 }
Exemplo n.º 3
0
        void Awake()
        {
            if (rayObstacleObject == null)
            {
                Debug.LogWarning("未设置 rayObstacleObject 参数!");
                return;
            }

            panel = GetComponent <SelectablePanel>();
            panel.OnFocusEvent += OnFocus;
            panel.OnBlurEvent  += OnBlur;

            rayObstacleObject.PointerDownEvent += OnPointerDown;
        }