Пример #1
0
 public Interface(Interface parent, _TyIf type)
 {
     this.parent = parent;
     this.type   = type;
 }
Пример #2
0
    public void CallRecieve(Interface handle, _TyIf type)
    {
        SelectButton(handle);
        CloseDefaultTab();
        if (tabhandle != null)
        {
            tabhandle.SetActive(false);
            tabhandle = null;
        }
        switch (type)
        {
        case _TyIf.MENU:
            Interface tab = GameManager.Instance.interfaceManager.defaultIf[(int)_DefaultInterface._SpecialTab];
            tab.transform.DOScale(Vector2.zero, 1f).SetEase(Ease.OutQuint);
            Interface     temp;
            RectTransform h = handle.GetComponent <RectTransform>();
            float         moveF;
            if (usehandle != null)
            {
                for (int i = 0; i < handle.childs.Length; i++)
                {
                    temp  = handle.childs[i];
                    moveF = h.localPosition.y - (h.rect.height * 1.07f * (i + 1));
                    temp.transform.DOLocalMoveY(moveF, 0.5f).SetEase(Ease.OutCubic);
                }
            }
            else
            {
                for (int i = handle.childs.Length - 1; i > -1; i--)
                {
                    temp  = handle.childs[i];
                    moveF = h.localPosition.y;
                    temp.transform.DOLocalMoveY(moveF, 0.5f).SetEase(Ease.OutCubic);
                }
            }
            break;

        case _TyIf.PARTSHOP:

            OpenTab(handle);
            SetScrollCategory(handle.childs[0], Item_Ty._WaterQuality);

            break;

        case _TyIf.COLLECTION:

            OpenTab(handle);
            SetScrollCategory(handle.childs[0], Item_Ty._Collection);

            break;

        case _TyIf.INVENTORY:

            OpenTab(handle);
            SetScrollCategory(handle.childs[0], Item_Ty._Inventory);

            break;

        case _TyIf.HELP:

            break;

        case _TyIf.SETTING:

            OpenTab(handle);

            break;

        case _TyIf.WATERTANK:
            tabhandle = handle.childs[0].transform.parent.gameObject;
            tabhandle.SetActive(true);
            OpenSpecialTab();
            if (usehandle == defaultIf[(int)_DefaultInterface._Tank1])
            {
                SetScrollCategory(handle.childs[0], Item_Ty._Tank1);
            }
            else
            {
                SetScrollCategory(handle.childs[0], Item_Ty._Tank2);
            }
            break;

        case _TyIf.SHARKSHOP:
            tabhandle = handle.childs[0].transform.parent.gameObject;
            tabhandle.SetActive(true);
            OpenSpecialTab();
            SetScrollCategory(handle.childs[0], Item_Ty._SharkShop);

            break;
        }
    }