public void TakeDamage(int amount) { currentHealth -= amount; //The Damage number part//// if (dn != null) { DamageNumber newDN = Instantiate(dn, transform.position, Quaternion.identity); newDN.SetValues(amount, currentHealth / (float)maxHealth, false); //need to find a way to tell this we're criting or not } //// if (currentHealth <= 0) { Die(); } }