Ejemplo n.º 1
0
    public void HideUI(bool hide)
    {
        GameObject tabHeaderUI = GameObject.Find("TabHeaderContainer");
        GameObject tabsUI      = GameObject.Find("Tabs");

        if (hide)
        {
            inventoryUI.GetComponent <CanvasGroup>().alpha = 0;
            uiPlayerTab.GetComponent <CanvasGroup>().alpha = 0;
            tooltip.GetComponent <CanvasGroup>().alpha     = 0;
            tabHeaderUI.GetComponent <CanvasGroup>().alpha = 0;
            tabsUI.GetComponent <CanvasGroup>().alpha      = 0;
        }
        else
        {
            inventoryUI.GetComponent <CanvasGroup>().alpha = 1;
            uiPlayerTab.GetComponent <CanvasGroup>().alpha = 1;
            tooltip.GetComponent <CanvasGroup>().alpha     = 1;
            tabHeaderUI.GetComponent <CanvasGroup>().alpha = 1;
            tabsUI.GetComponent <CanvasGroup>().alpha      = 1;
        }
    }
Ejemplo n.º 2
0
    public void Operating(bool bStatic)
    {
        if (PlayerInfoUI == null)
        {
            return;
        }

        Roleui uiInfo = PlayerInfoUI.GetComponent <Roleui>();

        if (uiInfo != null)
        {
            uiInfo.SetReady(bStatic);
        }
    }
Ejemplo n.º 3
0
    public void PopValueChange(int Value, PropertyType chgType, int hpMax, int mpMax, InvokePkg.CallBack callback = null, bool isCritical = false)
    {
        if (Value == 0)
        {
            if (callback != null)
            {
                callback();
            }
            return;
        }
        if (null == PlayerInfoUI)
        {
            return;
        }
        Roleui roleinfoUI = PlayerInfoUI.GetComponent <Roleui>();

        if (null == roleinfoUI)
        {
            return;
        }
        roleinfoUI.ValueChange(chgType, Value, hpMax, mpMax, true, false);
        if (isCritical)
        {
            EffectAPI.Play((EFFECT_ID)GlobalValue.EFFECT_Critical, ActorObj.transform.position + ActorObj.transform.forward, null, null, null, (EffectInst inst, ParamData pData) =>
            {
                inst.gameObject.SetActive(true);
                //Battle.BattleOver -= inst.GetComponent<EffectInst>().DestorySelf;
            });
        }
        if (PlayerID == GamePlayer.Instance.InstId)
        {
            AttaclPanel.Instance.ChangeValue(chgType, Value, hpMax, mpMax);
        }
        if (Battle.Instance.SelfActorBattleBaby != null)
        {
            if (PlayerID == Battle.Instance.SelfActorBattleBaby.InstId)
            {
                AttaclPanel.Instance.ChangeValueBaby(chgType, Value, hpMax, mpMax);
            }
        }
        if (callback != null)
        {
            GlobalInstanceFunction.Instance.Invoke(callback, 1f);
        }
    }