Exemplo n.º 1
0
    public IEnumerator Co_UpdateValue(SideEffectExecute buffSee, PlayerBuffUpdateRequest.UpdateTypes updateType)
    {
        BuffDescText.text = Utils.TextMeshProColorStringConvertToText(((PlayerBuffSideEffects)buffSee.SideEffectBases[0]).GenerateDesc());
        PlayerBuffSideEffects buff = (PlayerBuffSideEffects)buffSee.SideEffectBases[0];
        int buffValue = GetBuffValue(buffSee, buff);

        if (buffValue >= 0)
        {
            if (updateType == PlayerBuffUpdateRequest.UpdateTypes.Trigger)
            {
                BuffAnim.SetTrigger("Jump");
                AudioManager.Instance.SoundPlay("sfx/OnBuffTrigger", 0.7f);
            }

            else if (updateType == PlayerBuffUpdateRequest.UpdateTypes.Refresh)
            {
                BuffAnim.SetTrigger("Rotate");
                AudioManager.Instance.SoundPlay("sfx/OnBuffTrigger", 0.7f);
            }
        }

        yield return(new WaitForSeconds(0.2f));

        BuffValueText.text = buffValue == 0 ? "" : buffValue.ToString();
        yield return(new WaitForSeconds(0.1f));

        yield return(null);
    }
Exemplo n.º 2
0
    public void Init(SideEffectExecute buffSee, int buffId)
    {
        Cur_Buff = ((PlayerBuffSideEffects)buffSee.SideEffectBases[0]);
        int buffValue = GetBuffValue(buffSee, Cur_Buff);

        BuffValueText.text = buffValue == 0 ? "" : buffValue.ToString();
        BuffId             = buffId;
        ClientUtils.ChangeImagePicture(Image, Cur_Buff.M_SideEffectParam.GetParam_ConstInt("BuffPicId"));
        Color buffColor = ClientUtils.HTMLColorToColor(AllBuffs.GetBuff((Cur_Buff.Name)).M_SideEffectParam.GetParam_String("BuffColor"));

        BuffBloom.color        = buffColor;
        BuffDescText.color     = buffColor;
        BuffValuePanel.enabled = Cur_Buff.M_SideEffectParam.GetParam_Bool("HasNumberShow");
        BuffValueText.enabled  = Cur_Buff.M_SideEffectParam.GetParam_Bool("HasNumberShow");
        BuffAnim.SetTrigger("Add");
        BuffDescText.text = Utils.TextMeshProColorStringConvertToText(Cur_Buff.GenerateDesc());
    }
Exemplo n.º 3
0
 public void OnRemove()
 {
     BuffAnim.SetTrigger("Remove");
 }