private void Awake() { if (instance == null) { instance = this; } else if (instance != null) { Destroy(gameObject); } }
// Start is called before the first frame update void Start() { m_Collider = GetComponent <Collider>(); m_Coin = GetComponentInChildren <CoinCollect>(); }