Beispiel #1
0
 public void removeEffects( _EffectsRemove _effects, int _value )
 {
     if(_effects == _EffectsRemove.Armor)
     {
         this.armor -= _value;
     }
     else if(_effects == _EffectsRemove.Parry)
     {
         this.parry -= _value;
     }
     else if(_effects == _EffectsRemove.Fire)
     {
         this.resistance.fire -= _value;
     }
     else if(_effects == _EffectsRemove.Frost)
     {
         this.resistance.frost -= _value;
     }
     else if(_effects == _EffectsRemove.Nature)
     {
         this.resistance.nature -= _value;
     }
     else if(_effects == _EffectsRemove.Dark)
     {
         this.resistance.dark -= _value;
     }
 }
Beispiel #2
0
 public void removeEffects(_EffectsRemove _effects, int _value)
 {
     if (_effects == _EffectsRemove.Armor)
     {
         this.armor -= _value;
     }
     else if (_effects == _EffectsRemove.Parry)
     {
         this.parry -= _value;
     }
     else if (_effects == _EffectsRemove.Fire)
     {
         this.resistance.fire -= _value;
     }
     else if (_effects == _EffectsRemove.Frost)
     {
         this.resistance.frost -= _value;
     }
     else if (_effects == _EffectsRemove.Nature)
     {
         this.resistance.nature -= _value;
     }
     else if (_effects == _EffectsRemove.Dark)
     {
         this.resistance.dark -= _value;
     }
 }
Beispiel #3
0
 public void reverseEffects(_EffectsRemove _effects, int _value)
 {
     if (_effects == _EffectsRemove.Life)
     {
         this.currentLife += _value;
     }
 }
Beispiel #4
0
 public void reverseEffects(_EffectsRemove _effects, int _value)
 {
     if (_effects == _EffectsRemove.Life)
     {
         this.currentLife += _value;
     }
 }
Beispiel #5
0
 /// <summary>
 /// Construtor com parametro dos estados dos efeitos
 /// </summary>
 /// <param name="_effect"></param>
 public StatesEffect(StatesEffect _effect)
 {
     this.condition = _effect.condition;
     this.effectsRemove = _effect.effectsRemove;
     this.reservedValue = _effect.reservedValue;
     this.value = _effect.value;
     this.cooldownEffects = _effect.cooldownEffects;
     this.c_cooldownEffects = 0f;
     this.instante = _effect.instante;
 }
Beispiel #6
0
            bool c_instante = true;                     // Variavel auxiliar para controle do instante.     

            /// <summary>
            /// Construtor sem paremetro dos estados dos efeitos
            /// </summary>
            public StatesEffect()
            {
                this.condition = _Condition.None;
                this.effectsRemove = _EffectsRemove.None;
                this.reservedValue = 0;
                this.value = 0;
                this.cooldownEffects = 0f;
                this.c_cooldownEffects = 0f;
                this.instante = false;
            }
Beispiel #7
0
 /// <summary>
 /// Construtor com parametro dos estados dos efeitos
 /// </summary>
 /// <param name="_effect"></param>
 public StatesEffect(StatesEffect _effect)
 {
     this.condition         = _effect.condition;
     this.effectsRemove     = _effect.effectsRemove;
     this.reservedValue     = _effect.reservedValue;
     this.value             = _effect.value;
     this.cooldownEffects   = _effect.cooldownEffects;
     this.c_cooldownEffects = 0f;
     this.instante          = _effect.instante;
 }
Beispiel #8
0
            bool c_instante = true;                     // Variavel auxiliar para controle do instante.

            /// <summary>
            /// Construtor sem paremetro dos estados dos efeitos
            /// </summary>
            public StatesEffect()
            {
                this.condition         = _Condition.None;
                this.effectsRemove     = _EffectsRemove.None;
                this.reservedValue     = 0;
                this.value             = 0;
                this.cooldownEffects   = 0f;
                this.c_cooldownEffects = 0f;
                this.instante          = false;
            }
Beispiel #9
0
 public void removeEffects(_EffectsRemove _effects, int _value)
 {
     if (_effects == _EffectsRemove.Damage)
     {
         this.damage -= _value;
     }
     else if (_effects == _EffectsRemove.CriticalDamage)
     {
         this.criticalDamage -= _value;
     }
     else if (_effects == _EffectsRemove.ElementalDamage)
     {
         this.elementalDamage -= _value;
     }
 }
Beispiel #10
0
 public void removeEffects(_EffectsRemove _effects, int _value)
 {
     if (_effects == _EffectsRemove.Damage)
     {
         this.damage -= _value;
     }
     else if (_effects == _EffectsRemove.CriticalDamage)
     {
         this.criticalDamage -= _value;
     }
     else if (_effects == _EffectsRemove.ElementalDamage)
     {
         this.elementalDamage -= _value;
     }
 }
Beispiel #11
0
 public void reverseEffects(_EffectsRemove _effects, int _value)
 {
     if (_effects == _EffectsRemove.Strength)
     {
         this.strength += _value;
     }
     else if (_effects == _EffectsRemove.Stamina)
     {
         this.stamina += _value;
     }
     else if (_effects == _EffectsRemove.Intelligence)
     {
         this.intelligence += _value;
     }
     else if (_effects == _EffectsRemove.Agility)
     {
         this.agility += _value;
     }
 }
Beispiel #12
0
        /// <summary>
        /// Método Update responsavél pelos updates de todos os ciclos dos efeitos, atribuindo seus valores a cada componente.
        /// Usa como parametro O CustomCharacter que é nativo da biblioteca
        /// </summary>
        /// <param name="_character"></param>
        /// <param name="deltaTime"></param>
        public void update(RPGCustomCharacter _character, float deltaTime)
        {
            this.c_cooldown += deltaTime;

            if (this.c_cooldown < this.cooldown)
            {
                for (int i = 0; i < effects.Count; i++)
                {
                    _EffectsRemove __effect = this.effects[i].effectsRemove;

                    if (__effect == _EffectsRemove.Strength ||
                        __effect == _EffectsRemove.Agility ||
                        __effect == _EffectsRemove.Stamina ||
                        __effect == _EffectsRemove.Intelligence)
                    {
                        this.effects[i].update(_character.attributes, deltaTime);
                    }
                    else if (__effect == _EffectsRemove.Dark ||
                             __effect == _EffectsRemove.Fire ||
                             __effect == _EffectsRemove.Frost ||
                             __effect == _EffectsRemove.Nature ||
                             __effect == _EffectsRemove.Armor ||
                             __effect == _EffectsRemove.Parry)
                    {
                        this.effects[i].update(_character.armor, deltaTime);
                    }
                    else if (__effect == _EffectsRemove.Damage ||
                             __effect == _EffectsRemove.CriticalDamage ||
                             __effect == _EffectsRemove.ElementalDamage)
                    {
                        this.effects[i].update(_character.damage, deltaTime);
                    }
                    else if (__effect == _EffectsRemove.Life)
                    {
                        this.effects[i].update(_character.life, deltaTime);
                    }
                }
            }
            else
            {
                for (int i = 0; i < effects.Count; i++)
                {
                    _EffectsRemove __effect = this.effects[i].effectsRemove;

                    if (__effect == _EffectsRemove.Strength ||
                        __effect == _EffectsRemove.Agility ||
                        __effect == _EffectsRemove.Stamina ||
                        __effect == _EffectsRemove.Intelligence)
                    {
                        this.effects[i].restoreValue(_character.attributes);
                    }
                    else if (__effect == _EffectsRemove.Dark ||
                             __effect == _EffectsRemove.Fire ||
                             __effect == _EffectsRemove.Frost ||
                             __effect == _EffectsRemove.Nature ||
                             __effect == _EffectsRemove.Armor ||
                             __effect == _EffectsRemove.Parry)
                    {
                        this.effects[i].restoreValue(_character.armor);
                    }
                    else if (__effect == _EffectsRemove.Damage ||
                             __effect == _EffectsRemove.CriticalDamage ||
                             __effect == _EffectsRemove.ElementalDamage)
                    {
                        this.effects[i].restoreValue(_character.damage);
                    }
                }
            }
        }
Beispiel #13
0
 public void reverseEffects(_EffectsRemove _effects, int _value)
 {
     if (_effects == _EffectsRemove.Strength)
     {
         this.strength += _value;
     }
     else if (_effects == _EffectsRemove.Stamina)
     {
         this.stamina += _value;
     }
     else if (_effects == _EffectsRemove.Intelligence)
     {
         this.intelligence += _value;
     }
     else if (_effects == _EffectsRemove.Agility)
     {
         this.agility += _value;
     }
 }