private void OnTriggerEnter2D(Collider2D collision) { if (collision.tag == "Player") { scoreADDON.AddPoints(pointValue); scoreText.text = "Score: " + scoreADDON.score.ToString(); } }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.tag == "Player") { scoreADDON.AddPoints(pointValue); scoreText.text = "Score: " + scoreADDON.score.ToString(); GetComponent <Collider2D>().enabled = false; } }