コード例 #1
0
ファイル: MapFiller.cs プロジェクト: moSeSthe7th/VertigoDemo
    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);
                }
            }
        }
    }