Exemple #1
0
 //ISpeedMod Functions
 #region
 //SpeedDecrease and SpeedReset are ISpeedMod standard using DamageUtilities
 //SpeedIncrease has no functionality
 public void SpeedDecrease(float amount)
 {
     if (speed >= 0)
     {
         DamageUtilities.SpeedDecrease(this, amount);
     }
 }
Exemple #2
0
 public void Injure(float amount)
 {
     if (!isInvulnerable)
     {
         DamageUtilities.Injure(this, amount);
     }
 }
 //Bespoke Injure functionality
 //Checks that the player is neither invulnerable nor recently injured before applying damage and updating the sprite.
 //A coroutine is used to reset the player to the default, injurable state using InjuryReset() below.
 public void Injure(float amount)
 {
     if ((!isInvulnerable) && (!wasInjured))
     {
         DamageUtilities.Injure(this, amount);
         wasInjured   = true;
         sprite.color = Color.red;
         StartCoroutine(InjuryReset());
     }
 }
Exemple #4
0
 public void Injure(float amount)
 {
     if (isIsolated == true)
     {
         DamageUtilities.Injure(this, amount);
     }
     else
     {
         SpeedDecrease(amount / 10);
     }
 }
Exemple #5
0
 public void SpeedReset()
 {
     DamageUtilities.SpeedReset(this);
 }
Exemple #6
0
 //IVulnerable Functions
 #region
 //Heal & KIll are IVulnerable Standard using DamageUtilities
 //Injure slows the Spawner until it becomes ISOLATED then deals damage as IVulnerable standard with DamageUtilities
 public void Heal(float amount)
 {
     DamageUtilities.Heal(this, amount);
 }
Exemple #7
0
 public void SpeedIncrease(float amount)
 {
     DamageUtilities.SpeedIncrease(this, amount);
 }