mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 06:36:31 +09:00
Use generics everywhere.
This commit is contained in:
@ -85,13 +85,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
if (hitOffset < OsuHitObject.HIT_WINDOW_50)
|
||||
{
|
||||
Judgement.Result = HitResult.Hit;
|
||||
|
||||
if (hitOffset < OsuHitObject.HIT_WINDOW_300)
|
||||
osuJudgement.Score = OsuScoreResult.Hit300;
|
||||
else if (hitOffset < OsuHitObject.HIT_WINDOW_100)
|
||||
osuJudgement.Score = OsuScoreResult.Hit100;
|
||||
else if (hitOffset < OsuHitObject.HIT_WINDOW_50)
|
||||
osuJudgement.Score = OsuScoreResult.Hit50;
|
||||
osuJudgement.Score = HitObject.ScoreResultForOffset(hitOffset);
|
||||
}
|
||||
else
|
||||
Judgement.Result = HitResult.Miss;
|
||||
|
@ -7,7 +7,7 @@ using osu.Game.Modes.Objects.Drawables;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
{
|
||||
public class DrawableOsuHitObject : DrawableHitObject
|
||||
public class DrawableOsuHitObject : DrawableHitObject<OsuHitObject>
|
||||
{
|
||||
public const float TIME_PREEMPT = 600;
|
||||
public const float TIME_FADEIN = 400;
|
||||
|
@ -48,6 +48,17 @@ namespace osu.Game.Modes.Osu.Objects
|
||||
}
|
||||
}
|
||||
|
||||
public OsuScoreResult ScoreResultForOffset(double offset)
|
||||
{
|
||||
if (offset < HitWindowFor(OsuScoreResult.Hit300))
|
||||
return OsuScoreResult.Hit300;
|
||||
if (offset < HitWindowFor(OsuScoreResult.Hit100))
|
||||
return OsuScoreResult.Hit100;
|
||||
if (offset < HitWindowFor(OsuScoreResult.Hit50))
|
||||
return OsuScoreResult.Hit50;
|
||||
return OsuScoreResult.Miss;
|
||||
}
|
||||
|
||||
public override void SetDefaultsFromBeatmap(Beatmap beatmap)
|
||||
{
|
||||
base.SetDefaultsFromBeatmap(beatmap);
|
||||
|
Reference in New Issue
Block a user