Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="EditorTileMap"/> class.
        /// </summary>
        /// <param name="map"><see cref="TileMap"/> object.</param>
        public EditorTileMap(TileMap map)
        {
            UndoRedoArea = new UndoRedoArea(map.Name) { MaxHistorySize = 100 };

            BuildFromTileMap(map);

            MapManager.Instance.MapChanged += MapChanged;

            LayerAdded += EditorMap_LayerAdded;

            PropertyChanged += EditorMap_PropertyChanged;

            HookEvents();
        }
Ejemplo n.º 2
0
 private IDisposable Start(string commandCaption, bool visible)
 {
     AssertNoCommand();
     currentArea = this;
     currentCommand = new Command(commandCaption, this, visible);
     return currentCommand;
 }
Ejemplo n.º 3
0
 public Command(string caption, UndoRedoArea parentArea, bool visible)
 {
     Caption = caption;
     this.parentArea = parentArea;
     this.Visible = visible;
 }