private void OnTriggerEnter(Collider other) { PlayerModel playerModel = other.GetComponent <PlayerModel>(); if (playerModel != null) { Store.AddCoin(1); Destroy(this.gameObject); } }