Пример #1
0
    /// <summary>
    /// Adds an event object (section or event) into the song.
    /// </summary>
    /// <param name="syncTrackObject">Item to add.</param>
    /// <param name="autoUpdate">Automatically update all read-only arrays?
    /// If set to false, you must manually call the updateArrays() method, but is useful when adding multiple objects as it increases performance dramatically.</param>
    public void Add(Event eventObject, bool autoUpdate = true)
    {
        eventObject.song = this;
        SongObjectHelper.Insert(eventObject, _events);

        if (autoUpdate)
        {
            UpdateCache();
        }
    }
Пример #2
0
    /// <summary>
    /// Adds a synctrack object (bpm or time signature) into the song.
    /// </summary>
    /// <param name="syncTrackObject">Item to add.</param>
    /// <param name="autoUpdate">Automatically update all read-only arrays?
    /// If set to false, you must manually call the updateArrays() method, but is useful when adding multiple objects as it increases performance dramatically.</param>
    public void Add(SyncTrack syncTrackObject, bool autoUpdate = true)
    {
        syncTrackObject.song = this;
        SongObjectHelper.Insert(syncTrackObject, _syncTrack);

        if (autoUpdate)
        {
            UpdateCache();
        }
    }
Пример #3
0
    /// <summary>
    /// Adds a chart object (note, starpower and/or chart event) into the chart.
    /// </summary>
    /// <param name="chartObject">The item to add</param>
    /// <param name="update">Automatically update all read-only arrays?
    /// If set to false, you must manually call the updateArrays() method, but is useful when adding multiple objects as it increases performance dramatically.</param>
    public int Add(ChartObject chartObject, bool update = true)
    {
        chartObject.chart = this;
        chartObject.song  = this._song;

        int pos = SongObjectHelper.Insert(chartObject, _chartObjects);

        if (update)
        {
            UpdateCache();
        }

        return(pos);
    }
Пример #4
0
    /// <summary>
    /// Adds an event object (section or event) into the song.
    /// </summary>
    /// <param name="syncTrackObject">Item to add.</param>
    /// <param name="autoUpdate">Automatically update all read-only arrays?
    /// If set to false, you must manually call the updateArrays() method, but is useful when adding multiple objects as it increases performance dramatically.</param>
    public void Add(Event eventObject, bool autoUpdate = true)
    {
        eventObject.song = this;
        SongObjectHelper.Insert(eventObject, _events);

        if (autoUpdate)
        {
            UpdateCache();
        }

        if (this == ChartEditor.Instance.currentSong)
        {
            ChartEditor.isDirty = true;
        }
    }
Пример #5
0
    /// <summary>
    /// Adds a synctrack object (bpm or time signature) into the song.
    /// </summary>
    /// <param name="syncTrackObject">Item to add.</param>
    /// <param name="autoUpdate">Automatically update all read-only arrays?
    /// If set to false, you must manually call the updateArrays() method, but is useful when adding multiple objects as it increases performance dramatically.</param>
    public void Add(SyncTrack syncTrackObject, bool autoUpdate = true)
    {
        syncTrackObject.song = this;
        SongObjectHelper.Insert(syncTrackObject, _syncTrack);

        if (autoUpdate)
        {
            UpdateCache();
        }

        if (this == ChartEditor.Instance.currentSong)
        {
            ChartEditor.isDirty = true;
        }
    }
Пример #6
0
    /// <summary>
    /// Adds a chart object (note, starpower and/or chart event) into the chart.
    /// </summary>
    /// <param name="chartObject">The item to add</param>
    /// <param name="update">Automatically update all read-only arrays?
    /// If set to false, you must manually call the updateArrays() method, but is useful when adding multiple objects as it increases performance dramatically.</param>
    public int Add(ChartObject chartObject, bool update = true)
    {
        chartObject.chart = this;
        chartObject.song  = this._song;

        int pos = SongObjectHelper.Insert(chartObject, _chartObjects);

        if (update)
        {
            UpdateCache();
        }

        if (this.song == ChartEditor.Instance.currentSong)
        {
            ChartEditor.isDirty = true;
        }

        return(pos);
    }