Esempio n. 1
0
 private void Awake()
 {
     if (instace != null)
     {
         Destroy(gameObject);
     }
     else
     {
         instace = this;
     }
 }
Esempio n. 2
0
 void Awake()
 {
     /*if (bricksPool == null)
      * {
      *  bricksPool = transform.parent;
      * }
      * if (bricksPool == null)
      * {
      *  Debug.LogError("[Brick] Either Brick's pool is not assigned OR Brick is not set as a child of a pool!");
      * }*/
     destroyEffect = GetComponent <BrickDestroyEffect>();
     dropper       = GetComponent <BrickDropper>();
 }