//Checks condition for player explosion private void Explode() { if (PlayerStatsManager.GetPlayerHealth() < 1f && PlayerStatsManager.GetCanSpawn()) { GameObject anim = Instantiate(explosionPrefab) as GameObject; Vector2 spawnPoint = new Vector2(transform.position.x, transform.position.y); anim.transform.position = spawnPoint; PlayerStatsManager.DecrementPlayerLives(1f); explosionSound.Play(); Spawn(); } }