private void OnMouseUpAsButton() { //If player is in range, acorn is able to be collected. if (playerDetector.isObjectInRange) { im.AddAcorn(amount); Destroy(gameObject); } }
// When the acorn is clicked, it gets added to the amount and is destroyed private void OnMouseUpAsButton() { im.AddAcorn(amount); Destroy(gameObject); }