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