2021-10-11 14:25:00 +08: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.
|
|
|
|
|
|
2021-10-13 11:51:41 +08:00
|
|
|
|
using osu.Framework.Testing;
|
2021-10-11 14:25:00 +08:00
|
|
|
|
using Realms;
|
|
|
|
|
|
|
|
|
|
#nullable enable
|
|
|
|
|
|
2021-11-19 18:07:21 +08:00
|
|
|
|
namespace osu.Game.Beatmaps
|
2021-10-11 14:25:00 +08:00
|
|
|
|
{
|
2021-10-13 11:51:41 +08:00
|
|
|
|
[ExcludeFromDynamicCompile]
|
2021-10-11 14:25:00 +08:00
|
|
|
|
[MapTo("BeatmapDifficulty")]
|
2021-11-19 18:07:21 +08:00
|
|
|
|
public class BeatmapDifficulty : EmbeddedObject, IBeatmapDifficultyInfo
|
2021-10-11 14:25:00 +08:00
|
|
|
|
{
|
|
|
|
|
public float DrainRate { get; set; } = IBeatmapDifficultyInfo.DEFAULT_DIFFICULTY;
|
|
|
|
|
public float CircleSize { get; set; } = IBeatmapDifficultyInfo.DEFAULT_DIFFICULTY;
|
|
|
|
|
public float OverallDifficulty { get; set; } = IBeatmapDifficultyInfo.DEFAULT_DIFFICULTY;
|
|
|
|
|
public float ApproachRate { get; set; } = IBeatmapDifficultyInfo.DEFAULT_DIFFICULTY;
|
|
|
|
|
|
|
|
|
|
public double SliderMultiplier { get; set; } = 1;
|
|
|
|
|
public double SliderTickRate { get; set; } = 1;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2021-11-19 18:07:21 +08:00
|
|
|
|
/// Returns a shallow-clone of this <see cref="BeatmapDifficulty"/>.
|
2021-10-11 14:25:00 +08:00
|
|
|
|
/// </summary>
|
2021-11-19 18:07:21 +08:00
|
|
|
|
public BeatmapDifficulty Clone()
|
2021-10-11 14:25:00 +08:00
|
|
|
|
{
|
2021-11-19 18:07:21 +08:00
|
|
|
|
var diff = new BeatmapDifficulty();
|
2021-10-11 14:25:00 +08:00
|
|
|
|
CopyTo(diff);
|
|
|
|
|
return diff;
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-19 18:07:21 +08:00
|
|
|
|
public void CopyTo(BeatmapDifficulty difficulty)
|
2021-10-11 14:25:00 +08:00
|
|
|
|
{
|
|
|
|
|
difficulty.ApproachRate = ApproachRate;
|
|
|
|
|
difficulty.DrainRate = DrainRate;
|
|
|
|
|
difficulty.CircleSize = CircleSize;
|
|
|
|
|
difficulty.OverallDifficulty = OverallDifficulty;
|
|
|
|
|
|
|
|
|
|
difficulty.SliderMultiplier = SliderMultiplier;
|
|
|
|
|
difficulty.SliderTickRate = SliderTickRate;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|