// игнорировать если айтем существует public void BuffDirty() { if (eventController == null) { eventController = Global.Component.GetEventController(); } if (buffController == null) { buffController = Global.Component.GetBuffController(); } Type type = Type.GetType(buffType.ToString()); IBuff buff = (IBuff)Activator.CreateInstance(type); buff.Buff(); }
public void BuffActivate(Item item) { if (eventController == null) { eventController = Global.Component.GetEventController(); } if (buffController == null) { buffController = Global.Component.GetBuffController(); } if (buffController.IsBuffExist(item) == false) { Type type = Type.GetType(buffType.ToString()); IBuff buff = (IBuff)Activator.CreateInstance(type); buff.Buff(); } eventController.OnAddBuffEvent.Invoke(item); }