RoomManager.InitializeList C# (CSharp) Метод

InitializeList() приватный Метод

private InitializeList ( float gridX, float gridY ) : List
gridX float
gridY float
Результат List
    List<Vector3> InitializeList(float gridX, float gridY)
    {
        // TODO: duplicated in RoomSetup, refactor
        float centerX = gridX * this.columns;
        float centerY = gridY * this.rows;

        List<Vector3> gridPositions = new List<Vector3> ();
        gridPositions.Clear ();
        for (int x = 1; x < columns - 1; x ++) {
            for (int y = 1; y < rows - 1; y ++) {
                float width = this.columns;
                float height = this.rows;

                float tileWidth = 1;
                float tileHeight = 1;

                float tileX = x + tileWidth / 2 - width / 2 + centerX;
                float tileY = y + tileHeight / 2 - height / 2 + centerY;

                gridPositions.Add(new Vector3 (tileX, tileY, 0f));
            }
        }

        return gridPositions;
    }