void PickUp(Collider2D player) { UI_manager ui = player.GetComponent <UI_manager>(); ui.UpdateScore(playerScore); Destroy(gameObject); Debug.Log("Picked Up"); }
public void AddScore(int points) { _score += points; _uiManager.UpdateScore(_score); }