private void SetCell(TileMask mask, int x, int y)
        {
            Vector3 position = Grid.CellToWorld(new Vector3Int(x, y, 0));

            mask.transform.position = position;

            mask.X = x;
            mask.Y = y;
        }
        private void CreateTileMasks()
        {
            Grid = FindObjectOfType <Grid>();

            GameObject group = GameObject.Find("TileMasks");

            int height = _serverDataProvider.MapSize.y;
            int width  = _serverDataProvider.MapSize.x;

            if (_tileMaskMatrix != null)
            {
                for (int i = 0; i < _tileMaskMatrix.GetLength(0); i++)
                {
                    for (int j = 0; j < _tileMaskMatrix.GetLength(1); j++)
                    {
                        Destroy(_tileMaskMatrix[i, j]);
                    }
                }
            }

            _tileMaskMatrix = new TileMask[height, width];

            for (int i = 0; i < _tileMaskMatrix.GetLength(0); i++)
            {
                for (int j = 0; j < _tileMaskMatrix.GetLength(1); j++)
                {
                    GameObject tileMaskGo = Instantiate(_tileMaskPrefab.gameObject, group.transform);
                    TileMask   tileMask   = tileMaskGo.GetComponent <TileMask>();

                    tileMask.SetColor(Color.black);
                    tileMask.SetAlpha(0.5f);
                    SetCell(tileMask, j, i);
                    _tileMaskMatrix[i, j] = tileMask;

                    tileMask.SetActive(false);
                }
            }
        }