Пример #1
0
        private IEnumerator UpdateBuffParam(BuffParamKind _kind, Dictionary <BasePartsData, int> _value, float _maxTime, int _skillId, UnitCtrl _source, bool _despelable, int _buffDebuffId, bool _isBuff, bool _additional)
        {
            EnableBuffParam(_kind, _value, true, _source, _isBuff, _additional);
            float time_5 = 0;

            while (true)
            {
                time_5 += DeltaTimeForPause;
                if (DeltaTimeForPause > 1)
                {
                    //buffDebuffSkilIds.Remove(_skillId);
                }
                bool k   = _buffDebuffId <= (_despelable && _isBuff ? clearedBuffIndex : clearedDebuffIndex);
                bool v16 = false;
                if (time_5 >= _maxTime || IdleOnly)
                {
                    v16 = true;
                }
                else
                {
                    v16 = Hp < 1;
                }
                if (k || v16)
                {
                    //buffDebuffSkilIds.Remove(_skillId);//特效相关
                    EnableBuffParam(_kind, _value, false, _source, _isBuff, _additional);
                    yield break;
                }
                yield return(null);
            }
        }
Пример #2
0
        public void EnableBuffParam(BuffParamKind _kind, Dictionary <BasePartsData, int> _value, bool _enable, UnitCtrl _source, bool _isBuff, bool _additional)
        {
            eStateIconType      bufficon;
            BuffDebuffConstData buffDebuffConstData = new BuffDebuffConstData(0, 0);

            if (BUFF_DEBUFF_ICON_DIC.TryGetValue(_kind, out BuffDebuffConstData buffDebuffConstData1))
            {
                buffDebuffConstData = buffDebuffConstData1;
            }
            else
            {
                string word = UnitName + "的BUFF图标种类出错,未找到种类为" + _kind.GetDescription() + "的图标!";
                BattleUIManager.Instance.LogMessage(word, eLogMessageType.ERROR, IsOther);
            }
            if (_isBuff)
            {
                bufficon = buffDebuffConstData.BuffIcon;
            }
            else
            {
                bufficon = buffDebuffConstData.DebuffIcon;
            }
            OnChangeState?.Invoke(this, bufficon, _enable);
            if (bufficon != eStateIconType.NONE)
            {
                if (_enable)
                {
                    if (_isBuff)
                    {
                        buffCounter++;
                    }
                    else
                    {
                        debuffCounter++;
                    }
                }
                else
                {
                    if (_isBuff)
                    {
                        buffCounter--;
                    }
                    else
                    {
                        debuffCounter--;
                    }
                }
            }
            foreach (BasePartsData a in _value.Keys)
            {
                a.SetBuffDebuff(_enable, _value[a], _kind, _source, null, _additional);
            }
        }
Пример #3
0
 public void SetBuffParam(BuffParamKind _kind, Dictionary <BasePartsData, int> _value, float _time, int _skillId, UnitCtrl _source, bool _despelable, eEffectType _effectType, bool _isBuff, bool _additional)
 {
     if (_isBuff || !IsAbnormalState(eAbnormalState.NO_EFFECT_SLIP_DAMAGE))
     {
         if (_effectType == eEffectType.COMMON)
         {
             //添加特效图标
         }
         buffDebuffIndex++;
         StartCoroutine(UpdateBuffParam(_kind, _value, _time, _skillId, _source, _despelable, buffDebuffIndex, _isBuff, _additional));
     }
     else
     {
         SetMissAtk(_source, eMissLogType.DODGE_BY_NO_DAMAGE_MOTION, eDamageEffectType.NORMAL, null, 1);
     }
 }
Пример #4
0
 public void EnableBuffParam(BuffParamKind _kind, Dictionary <BasePartsData, int> _value, bool _enable, UnitCtrl _source, bool _isBuff, bool _additional)
 {
 }