コード例 #1
0
        /// <summary>
        /// Creates a new <see cref="EditorChangeHandler"/>.
        /// </summary>
        /// <param name="editorBeatmap">The <see cref="EditorBeatmap"/> to track the <see cref="HitObject"/>s of.</param>
        public EditorChangeHandler(EditorBeatmap editorBeatmap)
        {
            this.editorBeatmap = editorBeatmap;

            editorBeatmap.HitObjectAdded   += hitObjectAdded;
            editorBeatmap.HitObjectRemoved += hitObjectRemoved;
            editorBeatmap.HitObjectUpdated += hitObjectUpdated;

            patcher = new LegacyEditorBeatmapPatcher(editorBeatmap);

            // Initial state.
            SaveState();
        }
コード例 #2
0
        /// <summary>
        /// Creates a new <see cref="EditorChangeHandler"/>.
        /// </summary>
        /// <param name="editorBeatmap">The <see cref="EditorBeatmap"/> to track the <see cref="HitObject"/>s of.</param>
        public EditorChangeHandler(EditorBeatmap editorBeatmap)
        {
            this.editorBeatmap = editorBeatmap;

            editorBeatmap.TransactionBegan   += BeginChange;
            editorBeatmap.TransactionEnded   += EndChange;
            editorBeatmap.SaveStateTriggered += SaveState;

            patcher = new LegacyEditorBeatmapPatcher(editorBeatmap);

            // Initial state.
            SaveState();
        }