public void VisibleCellsChangeHandler(object sender, VisibleCellsChangeEventArgs args) { // update min and max visible tiles minVisibleTile.x = args.CellsVisible.X + gridOffset.x; minVisibleTile.z = args.CellsVisible.Y + gridOffset.z; maxVisibleTile.x = minVisibleTile.x + args.CellsVisible.Width - 1; maxVisibleTile.z = minVisibleTile.z + args.CellsVisible.Height - 1; UpdateVisible(); }