Пример #1
0
        public void endEffect(Hashtable table)
        {
            RemoveBuffEvtArg arg = new RemoveBuffEvtArg();

            arg.buffID   = (int)table ["BuffID"];
            arg.casterID = (table["Caster"] as Actor).GetInstanceID();
            arg.ownerID  = (table["Owner"] as Actor).GetInstanceID();
            arg.count    = 1;
            Debug.Log("结束Berserk效果事件");
            FireEvent(this, EventType.EVT_REMOVE_BUFF, arg);
        }
Пример #2
0
        public void OnRemoveBuff(object sender, EventArgs arg)
        {
            RemoveBuffEvtArg e = arg as RemoveBuffEvtArg;
            int buffId         = e.buffID;
            int casterId       = e.casterID;
            int ownerId        = e.ownerID;
            int count          = e.count;

            if (ownerId == gameObject.GetComponent <Actor>().GetInstanceID())
            {
                Debug.Log(name + "移除buff , buff ID = " + buffId);
                RemoveBuff(buffId, count);
            }
        }