public void LifeLost() { if (c < totalChildCount) { transform.GetChild(c).GetComponent <SpriteRenderer>().color = Color.red; transform.GetChild(c).transform.GetChild(0).gameObject.SetActive(true); c++; spawnerScript.setCanPlayerSpawn(true); } else { gameOver = true; socreMan.setHighScore(); gameOverAnime.SetBool("gameOver", true); Debug.Log("GameOver"); } }