public void Damage(int damage) { audioSource.PlayOneShot(audioClips[0]); Debug.Log(weaponControl.NoDamage()); if (!weaponControl.NoDamage()) { hp -= damage; if (hp <= 25) { hpFill.color = new Color32(255, 0, 0, 255); } else if (hp <= 50) { hpFill.color = new Color32(255, 255, 0, 255); } else { hpFill.color = new Color32(0, 255, 0, 255); } playerMove.KnockBack(); hpSlider.value = (hp * 0.01f); if (hp <= 0) { GameOver(); } } }