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); }
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); }
protected override void InitializeEx() { base.InitializeEx(); BuffComp = ComponentMgr.Instance.CreateComponent <BuffComponent>(this); }