Ejemplo n.º 1
0
    //===================================================================================
    //
    // Event
    //
    //===================================================================================
    private void OnHelpTooltip(GameObject go, bool state)
    {
        UserBuffInfo buffInfo = UserInfo.Instance.userBuffInfo;

        UserBuffIcon icon = go.GetComponent <UserBuffIcon>();

        if (_simpleHelpTip == null)
        {
            _simpleHelpTip = UIResourceMgr.CreatePrefab <SimpleHelpTip>(BUNDLELIST.PREFABS_UI_MAINMENU, transform, "SimpleHelpTip", SetTransformType.Default);
        }

        _simpleHelpTip.gameObject.SetActive(state);

        if (state == true)
        {
            UtilTransform.AttachTransForm(go.transform, _simpleHelpTip.transform, SetTransformType.Default);

            _simpleHelpTip.Init(buffInfo.GetText(icon.userBuffType));
            _simpleHelpTip.OpenUI();

            UtilTransform.AttachTransForm(_scrollView.transform.parent, _simpleHelpTip.transform, SetTransformType.IgnoreValue);
        }
        else
        {
            _simpleHelpTip.CloseUI();
        }
    }
Ejemplo n.º 2
0
    private void OnHelpTooltip(GameObject go, bool state)
    {
        if (state == true)
        {
            if (_SimpleHelpTip == null)
            {
                _SimpleHelpTip = UIResourceMgr.CreatePrefab <SimpleHelpTip>(BUNDLELIST.PREFABS_UI_MAINMENU, _HelpButton.transform, "SimpleHelpTip");
                _SimpleHelpTip.Init(20);
            }

            _SimpleHelpTip.OpenUI();
        }
        else
        {
            _SimpleHelpTip.CloseUI();
        }
    }