// Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using OpenTK.Graphics; using osu.Game.Beatmaps.Timing; using osu.Game.Database; using osu.Game.Modes; using osu.Game.Modes.Objects; using System.Collections.Generic; namespace osu.Game.Beatmaps { /// /// A Beatmap containing converted HitObjects. /// public class Beatmap where T : HitObject { public BeatmapInfo BeatmapInfo; public TimingInfo TimingInfo = new TimingInfo(); public readonly List ComboColors = new List { new Color4(17, 136, 170, 255), new Color4(102, 136, 0, 255), new Color4(204, 102, 0, 255), new Color4(121, 9, 13, 255) }; public BeatmapMetadata Metadata => BeatmapInfo?.Metadata ?? BeatmapInfo?.BeatmapSet?.Metadata; /// /// The HitObjects this Beatmap contains. /// public List HitObjects; /// /// Constructs a new beatmap. /// /// The original beatmap to use the parameters of. public Beatmap(Beatmap original = null) { BeatmapInfo = original?.BeatmapInfo ?? BeatmapInfo; TimingInfo = original?.TimingInfo ?? TimingInfo; ComboColors = original?.ComboColors ?? ComboColors; } } /// /// A Beatmap containing un-converted HitObjects. /// public class Beatmap : Beatmap { /// /// Calculates the star difficulty for this Beatmap. /// /// The star difficulty. public double CalculateStarDifficulty() => RulesetCollection.GetRuleset(BeatmapInfo.Mode).CreateDifficultyCalculator(this).Calculate(); /// /// Constructs a new beatmap. /// /// The original beatmap to use the parameters of. public Beatmap(Beatmap original = null) : base(original) { } } }