Пример #1
0
        public static void InitBuffModuleList(this UnitFactory factory)
        {
            if (ObjectBuffModuleDict.Count() > 0)
            {
                return;
            }

            var slowDownBuff = new ObjectSlowDownBuff();

            ObjectBuffModuleDict.Set(slowDownBuff.Id, slowDownBuff);
        }
Пример #2
0
        public static void RemoveBuff(GUnit unit, IBuffData buffData, bool removeFromBuffDataList = true)
        {
            var buffModule = ObjectBuffModuleDict.Get(buffData.GetType().GetHashCode());

            buffModule.Finish(unit, buffData, removeFromBuffDataList);
        }
Пример #3
0
        public static void AddBuff(GUnit unit, IBuffData buffData, bool removeWhenFinish = true)
        {
            var buffModule = ObjectBuffModuleDict.Get(buffData.GetType().GetHashCode());

            buffModule.Start(unit, buffData, removeWhenFinish);
        }