private void HealthCheck() { if (effectiveInviciFrames >= 0f) { effectiveInviciFrames -= Time.deltaTime; } if (health <= 0) { if (bossBatlle) { ReloadStage(); health = startHealth; } else { respawnScript.PlayerDied(); health = startHealth; for (int i = 0; i < healthIcons.Length; i++) { healthIcons[i].GetComponent <HealthIconScript>().ResetIcons(); } } } }