Esempio n. 1
0
        public void AddBuff(ulong uid, int buffId)
        {
            RoleEntity entity = EntityMgr.Instance.GetEntity <RoleEntity>(uid);

            if (entity == null)
            {
                LogHelper.PrintError(string.Format("[BuffMgr]entity is null,uid is {0}.", uid));
                return;
            }
            BuffComponent comp = entity.BuffComp;

            if (comp == null)
            {
                LogHelper.PrintError(string.Format("[BuffMgr]buffComponent is null,uid is {0}.", uid));
                return;
            }
            Buff buff = null;//

            comp.AddBuff(buff);
        }
Esempio n. 2
0
        public void AddBuff(ulong uid, int buffId)
        {
            RoleEntity entity = EntityMgr.singleton.GetEntity <RoleEntity>(uid);

            if (entity == null)
            {
                LogHelper.PrintError($"[BuffMgr]entity is null,uid is {uid}.");
                return;
            }
            BuffComponent comp = entity.BuffComp;

            if (comp == null)
            {
                LogHelper.PrintError($"[BuffMgr]buffComponent is null,uid is {uid}.");
                return;
            }
            Buff buff = null;//

            comp.AddBuff(buff);
        }
Esempio n. 3
0
 protected override void InitializeEx()
 {
     base.InitializeEx();
     BuffComp = ComponentMgr.Instance.CreateComponent <BuffComponent>(this);
 }