示例#1
0
    public IEnumerator CallUpdateBag(Transform Parent)
    {
        //Waiting for update gme itself
        yield return(null);

        _UISelect.MakeTopOfEveryThing();
        _UISelect.ComeToMe(_UISelect._EventSystem.firstSelectedGameObject.GetComponent <RectTransform>());
        yield return(null);

        //Takes all the items in the desired inventory slots and pass them to ui controller attack ıtem window create when any changes in the inventory
        if (Parent == AttackItem)
        {
            _UIController.AttackItem_Content.CreateItemSlots(GetItemsInTheBag(Parent));
            yield return(null);

            _UIController.AttackItem_Content.MakeNavigationBinding();
        }
        if (Parent == DefenceItem)
        {
            _UIController.DefenceItem_Content.CreateItemSlots(GetItemsInTheBag(Parent));
            yield return(null);

            _UIController.DefenceItem_Content.MakeNavigationBinding();
        }
    }
 public void OnPointerEnter(PointerEventData eventData)
 {
     _UISelect.ComeToMe(GetComponent <RectTransform>());
     _UISelect._EventSystem.SetSelectedGameObject(gameObject);
 }