Remove the concept of beatmap events, rename BreakEvent -> BreakPeriod.

This commit is contained in:
smoogipooo
2017-05-22 10:12:33 +09:00
parent 8c260e3364
commit 0a0139aded
8 changed files with 21 additions and 80 deletions

View File

@ -2,11 +2,11 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using OpenTK.Graphics;
using osu.Game.Beatmaps.Events;
using osu.Game.Beatmaps.Timing;
using osu.Game.Database;
using osu.Game.Rulesets.Objects;
using System.Collections.Generic;
using System.Linq;
namespace osu.Game.Beatmaps
{
@ -18,7 +18,7 @@ namespace osu.Game.Beatmaps
{
public BeatmapInfo BeatmapInfo;
public TimingInfo TimingInfo = new TimingInfo();
public EventInfo EventInfo = new EventInfo();
public List<BreakPeriod> Breaks = new List<BreakPeriod>();
public readonly List<Color4> ComboColors = new List<Color4>
{
new Color4(17, 136, 170, 255),
@ -34,6 +34,11 @@ namespace osu.Game.Beatmaps
/// </summary>
public List<T> HitObjects;
/// <summary>
/// Total amount of break time in the beatmap.
/// </summary>
public double TotalBreakTime => Breaks.Sum(b => b.Duration);
/// <summary>
/// Constructs a new beatmap.
/// </summary>
@ -42,7 +47,7 @@ namespace osu.Game.Beatmaps
{
BeatmapInfo = original?.BeatmapInfo ?? BeatmapInfo;
TimingInfo = original?.TimingInfo ?? TimingInfo;
EventInfo = original?.EventInfo ?? EventInfo;
Breaks = original?.Breaks ?? Breaks;
ComboColors = original?.ComboColors ?? ComboColors;
}
}