示例#1
0
    private bool CheckEffectTimeisOver(EffectedStruct target)
    {
        float passedTime = target.inputTime + target.targetEffect.effectDuration;

        if (ManagerHandler.Instance.GameTime().GetTime() > passedTime)
        {
            return(true);
        }
        else
        {
            return(false);
        }
    }
示例#2
0
    private void CheckFreezeEffectList()
    {
        bool isFreezeTemp = false;

        if (FreezeEffectList != null && FreezeEffectList.Count > 0)
        {
            isFreezeTemp = true;
            for (int i = FreezeEffectList.Count - 1; i >= 0; i--)
            {
                EffectedStruct effect = FreezeEffectList[i];
                if (CheckEffectTimeisOver(effect))
                {
                    FreezeEffectList.Remove(effect);
                }
            }
        }
        isFreeze = isFreezeTemp;
    }
示例#3
0
    private void CheckSpeedMultipleEffectList()
    {
        float tempValue = 1;

        if (SpeedMultiplyEffectList != null)
        {
            for (int i = SpeedMultiplyEffectList.Count - 1; i >= 0; i--)
            {
                EffectedStruct effect = SpeedMultiplyEffectList[i];
                tempValue *= (effect.targetEffect as SpeedMultiple).GetMultipleValue();
                if (CheckEffectTimeisOver(effect))
                {
                    SpeedMultiplyEffectList.Remove(effect);
                }
            }
        }
        multiplyValue = tempValue;
    }
示例#4
0
    private void CheckImmune()
    {
        bool tempisImmune = false;

        if (!ImmuneEffectList.Equals(null) && ImmuneEffectList.Count > 0)
        {
            tempisImmune = true;
            for (int i = ImmuneEffectList.Count - 1; i >= 0; i--)
            {
                EffectedStruct effect = ImmuneEffectList[i];
                if (CheckEffectTimeisOver(effect))
                {
                    ImmuneEffectList.Remove(effect);
                }
            }
        }

        isImmune = tempisImmune;
    }
示例#5
0
    private void SetupEffectList(SpeedMultiple targetEffect)
    {
        bool IsInputAble = true;

        //SpeedMultiplyEffectList를 돌아본뒤에 중복되는 이름이 없을경우 List에 추가.
        //먼저 중복되는 이름이 있는지부터 검사.
        for (int i = SpeedMultiplyEffectList.Count - 1; i >= 0; i--)
        {
            EffectedStruct es = SpeedMultiplyEffectList[i];
            if (es.targetEffect.effectName.Equals(targetEffect.effectName))
            {
                IsInputAble = false;
            }
        }
        //중복되는 이름이 없을경우 새로이 추가한다.
        if (IsInputAble && !isImmune)
        {
            SpeedMultiplyEffectList.Add(new EffectedStruct(targetEffect, ManagerHandler.Instance.GameTime().GetTime()));
        }
    }