public void FillTheMap() { foreach (Vector3 posVec in hexList) { Vector2 posOfOverlapBox = new Vector2(posVec.x, posVec.y); //Collider[] colliders = Physics.OverlapSphere(posVec, 1f); Collider2D collider = Physics2D.OverlapBox(posOfOverlapBox, sizeOfOverlapBox, 0); if (collider == null) { uIHandler.AddPoints(); if (DataScript.point % 1000 == 0) { gameCreator.CreateBombInPosition(posVec); } else { gameCreator.CreateHexInPosition(posVec); } } } }