Example #1
0
        private IEnumerator EffectRepeater(Creature target, TimedEffectContainer container, float value)
        {
            TimedEffect timedEffect = container.timedEffect;
            float       startTime   = Time.time + timedEffect.timeToStart;
            float       endTime     = Time.time + timedEffect.timeToStart + timedEffect.duration;

            while (Time.time < startTime)
            {
                yield return(null);
            }

            while (Time.time <= endTime)
            {
                endTime = startTime + container.timeToEnd;
                StartCoroutine(DoTimedEffect(target, container, value));
                yield return(new WaitForSeconds(timedEffect.repeatTime));
            }
        }
        public override void ResolveReduplication(Creature target, Performable effect)
        {
            TimedEffect tE = effect as TimedEffect;

            this.timeToEnd += tE.duration;
        }