/// <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();
        }
 private IDisposable Start(string commandCaption, bool visible)
 {
     AssertNoCommand();
     currentArea = this;
     currentCommand = new Command(commandCaption, this, visible);
     return currentCommand;
 }
Esempio n. 3
0
 public Command(string caption, UndoRedoArea parentArea, bool visible)
 {
     Caption = caption;
     this.parentArea = parentArea;
     this.Visible = visible;
 }