Exemple #1
0
        protected virtual float[] NormalizeDmg(RecievedDamage rD)
        {
            float[] ar = { rD.fire, rD.lightning, rD.physic, rD.water };
            if (ar.Max() != 0)
            {
                for (int i = 0; i < ar.Length; i++)
                {
                    ar[i] = ar[i] / ar.Max();
                }

                return(ar);
            }

            return(ar);
        }
Exemple #2
0
 public virtual void DisplayDamage(RecievedDamage rD)
 {
     float[] mults = NormalizeDmg(rD);
     ShowParticles(mults);
     StartCoroutine(CallDelayedAction(HideParticles, 1f));
 }