コード例 #1
0
    public void Invoke(InvokePkg.CallBack callback, float time)
    {
        InvokePkg ip = new InvokePkg();

        ip.frame_line_   = int.MaxValue;
        ip.dead_line_    = time;
        ip.dead_lineMax_ = time;
        ip.call_back_    = callback;
        invokeLst.Add(ip);
    }
コード例 #2
0
 public void InvokeRepeat(InvokePkg.CallBack callback, float time)
 {
     lock (invokeLst)
     {
         InvokePkg ip = new InvokePkg();
         ip.dead_line_    = time;
         ip.dead_lineMax_ = time;
         ip.call_back_    = callback;
         ip.isRepeat_     = true;
         invokeLst.Add(ip);
     }
 }
コード例 #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);
        }
    }