Beispiel #1
0
        private void HandleTileMapClick(MapViewer mv)
        {
            mv.ChangeCameraMoveable(true);
            this.ucSpriteSheet.ChangeCameraMoveable(false);
            MapCell ssCell = null;
            MapCell meCell = null;
            if (this.ucSpriteSheet.SelectedMapCells.Count > 0 && this.ucMapEdit.SelectedMapCells.Count > 0)
            {
                ssCell = this.ucSpriteSheet.SelectedMapCells[0];
                meCell = this.ucMapEdit.Map.MapRows[this.ucMapEdit.SelectedMapCells[0].RowIndex].Cells[this.ucMapEdit.SelectedMapCells[0].ColumnIndex];
                for (int i = meCell.Tiles.Count; i < SelectedLayer; i++)
                {
                    meCell.Tiles.Add(new Tile("Default", 0, Vector2.Zero));
                }

                meCell.Tiles[SelectedLayer - 1] = ssCell.Tiles[0];
            }
        }
Beispiel #2
0
 private void HandleSpriteMapClick(MapViewer mv)
 {
     mv.ChangeCameraMoveable(true);
     this.ucMapEdit.ChangeCameraMoveable(false);
 }