int num = 3; string output= "Gem numbers = 3"; void OnTriggerEnter (Collider other) { if (other.tag == "Picker") { num--; output = "Gem numbers = " + num.ToString(); if (num == 0) output = "你贏了!"; Destroy (other.gameObject); } }