private void Awake() { tiles = GameObject.Find("touchTiles").GetComponent <TouchPos> (); trans = GetComponent <Transform> (); render = GetComponent <SpriteRenderer> (); switch (typeUnit) { case 3: timeDespawn = new WaitForSeconds(20f); break; default: timeDespawn = new WaitForSeconds(3f); break; } }