public void RemoveDot() { dots--; if (dots == 0) { sceneManagement.LoadScene(ManageScene.Scenes.Win); } }
private void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.tag.Equals("Ghost")) { lives--; Debug.Log($"{lives} - {gameObject.name} was hit by {collision.gameObject.name}"); AudioSource.PlayClipAtPoint(deathClip, Camera.main.transform.position); if (lives > 0) { transform.position = new Vector3(64, 49, transform.position.z); } else { sceneManagement.LoadScene(ManageScene.Scenes.Lose); } } }