1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-16 11:22:55 +08:00

Merge branch 'taiko_judgement_scoring' into taiko_drumroll_drawable

Conflicts:
	osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj
This commit is contained in:
smoogipooo 2017-03-17 19:01:02 +09:00
commit 1e7511a923
3 changed files with 83 additions and 0 deletions

View File

@ -7,5 +7,76 @@ namespace osu.Game.Modes.Taiko.Judgements
{
public class TaikoJudgementInfo : JudgementInfo
{
/// <summary>
/// The maximum score value.
/// </summary>
public const TaikoScoreResult MAX_SCORE = TaikoScoreResult.Great;
/// <summary>
/// The score value.
/// </summary>
public TaikoScoreResult Score;
/// <summary>
/// The score value for the combo portion of the score.
/// </summary>
public int ScoreValue => ScoreToInt(Score);
/// <summary>
/// The score value for the accuracy portion of the score.
/// </summary>
public int AccuracyScoreValue => AccuracyScoreToInt(Score);
/// <summary>
/// The maximum score value for the combo portion of the score.
/// </summary>
public int MaxScoreValue => ScoreToInt(MAX_SCORE);
/// <summary>
/// The maximum score value for the accuracy portion of the score.
/// </summary>
public int MaxAccuracyScoreValue => AccuracyScoreToInt(MAX_SCORE);
/// <summary>
/// Whether this Judgement has a secondary hit in the case of finishers.
/// </summary>
public bool SecondHit;
/// <summary>
/// Computes the score value for the combo portion of the score.
/// For the accuracy portion of the score (including accuracy percentage), see <see cref="AccuracyScoreToInt(TaikoScoreResult)"/>.
/// </summary>
/// <param name="result">The result to compute the score value for.</param>
/// <returns>The int score value.</returns>
protected virtual int ScoreToInt(TaikoScoreResult result)
{
switch (result)
{
default:
return 0;
case TaikoScoreResult.Good:
return 100;
case TaikoScoreResult.Great:
return 300;
}
}
/// <summary>
/// Computes the score value for the accurac portion of the score.
/// </summary>
/// <param name="result">The result to compute the score value for.</param>
/// <returns>The int score value.</returns>
protected virtual int AccuracyScoreToInt(TaikoScoreResult result)
{
switch (result)
{
default:
return 0;
case TaikoScoreResult.Good:
return 150;
case TaikoScoreResult.Great:
return 300;
}
}
}
}

View File

@ -0,0 +1,11 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
namespace osu.Game.Modes.Taiko.Judgements
{
public enum TaikoScoreResult
{
Good,
Great
}
}

View File

@ -50,6 +50,7 @@
<Compile Include="Beatmaps\TaikoBeatmapConverter.cs" />
<Compile Include="Beatmaps\TaikoBeatmapProcessor.cs" />
<Compile Include="Judgements\TaikoJudgementInfo.cs" />
<Compile Include="Judgements\TaikoScoreResult.cs" />
<Compile Include="Objects\Drawable\DrawableTaikoHitObject.cs" />
<Compile Include="Objects\DrumRoll.cs" />
<Compile Include="Objects\DrumRollTick.cs" />