コード例 #1
0
ファイル: Actor.cs プロジェクト: yangxun983323204/loh
    public void AddBuff(int id)
    {
        var buff = Buff.Create(id);
        var node = Buffs.Find(i => { return(i.Data.Id == id); });

        if (node != null)
        {
            node.Overlay(buff);
            var evt = new Evt_UpdateBuff()
            {
                Target = this, Data = node
            };
            EventManager.Instance.QueueEvent(evt);
        }
        else
        {
            buff.SetOwner(this);
            Buffs.AddLast(buff);
            var evt = new Evt_AddBuff()
            {
                Target = this, Data = buff
            };
            EventManager.Instance.QueueEvent(evt);
        }
    }