2019-01-24 08:43:03 +00:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using osu.Game.Beatmaps;
|
2018-05-07 01:58:56 +00:00
|
|
|
|
using osu.Game.Graphics;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
using osu.Game.Rulesets.Mania.Objects;
|
|
|
|
|
using osu.Game.Rulesets.Mania.UI;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Mania.Beatmaps
|
|
|
|
|
{
|
|
|
|
|
public class ManiaBeatmap : Beatmap<ManiaHitObject>
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The definitions for each stage in a <see cref="ManiaPlayfield"/>.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public List<StageDefinition> Stages = new List<StageDefinition>();
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Total number of columns represented by all stages in this <see cref="ManiaBeatmap"/>.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int TotalColumns => Stages.Sum(g => g.Columns);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates a new <see cref="ManiaBeatmap"/>.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="defaultStage">The initial stages.</param>
|
|
|
|
|
public ManiaBeatmap(StageDefinition defaultStage)
|
|
|
|
|
{
|
|
|
|
|
Stages.Add(defaultStage);
|
|
|
|
|
}
|
2018-05-07 01:58:56 +00:00
|
|
|
|
|
|
|
|
|
public override IEnumerable<BeatmapStatistic> GetStatistics()
|
|
|
|
|
{
|
2018-05-07 02:33:05 +00:00
|
|
|
|
int notes = HitObjects.Count(s => s is Note);
|
2018-05-07 01:58:56 +00:00
|
|
|
|
int holdnotes = HitObjects.Count(s => s is HoldNote);
|
|
|
|
|
|
|
|
|
|
return new[]
|
|
|
|
|
{
|
|
|
|
|
new BeatmapStatistic
|
|
|
|
|
{
|
|
|
|
|
Name = @"Note Count",
|
|
|
|
|
Content = notes.ToString(),
|
|
|
|
|
Icon = FontAwesome.fa_circle_o
|
|
|
|
|
},
|
|
|
|
|
new BeatmapStatistic
|
|
|
|
|
{
|
|
|
|
|
Name = @"Hold Note Count",
|
|
|
|
|
Content = holdnotes.ToString(),
|
|
|
|
|
Icon = FontAwesome.fa_circle
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
}
|
2018-04-13 09:19:50 +00:00
|
|
|
|
}
|
|
|
|
|
}
|