public static void InitBuffModuleList(this UnitFactory factory) { if (ObjectBuffModuleDict.Count() > 0) { return; } var slowDownBuff = new ObjectSlowDownBuff(); ObjectBuffModuleDict.Set(slowDownBuff.Id, slowDownBuff); }
public static void RemoveBuff(GUnit unit, IBuffData buffData, bool removeFromBuffDataList = true) { var buffModule = ObjectBuffModuleDict.Get(buffData.GetType().GetHashCode()); buffModule.Finish(unit, buffData, removeFromBuffDataList); }
public static void AddBuff(GUnit unit, IBuffData buffData, bool removeWhenFinish = true) { var buffModule = ObjectBuffModuleDict.Get(buffData.GetType().GetHashCode()); buffModule.Start(unit, buffData, removeWhenFinish); }