void OnCollisionEnter(Collision collision) { GetComponent <Renderer>().material.color = Color.blue; otherScript = GameObject.FindGameObjectWithTag("ScoreText").GetComponent <increaseScore>(); otherScript.UpdateCount(); Destroy(gameObject); }
void OnCollisionEnter(Collision collision) { GetComponent<Renderer>().material.color = Color.blue; otherScript = GameObject.FindGameObjectWithTag("ScoreText").GetComponent<increaseScore>(); otherScript.UpdateCount(); Destroy(gameObject); }