mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 10:03:05 +08:00
Add explicit CentreHit/RimHit classes.
This commit is contained in:
parent
ff325ac330
commit
cf4d11c51c
@ -74,14 +74,23 @@ namespace osu.Game.Modes.Taiko.Beatmaps
|
||||
};
|
||||
}
|
||||
|
||||
HitType type = (sample & ~(SampleType.Finish | SampleType.Normal)) == 0 ? HitType.Centre : HitType.Rim;
|
||||
bool isCentre = (sample & ~(SampleType.Finish | SampleType.Normal)) == 0;
|
||||
|
||||
return new Hit
|
||||
if (isCentre)
|
||||
{
|
||||
return new CentreHit
|
||||
{
|
||||
StartTime = original.StartTime,
|
||||
Sample = original.Sample,
|
||||
IsStrong = strong
|
||||
};
|
||||
}
|
||||
|
||||
return new RimHit
|
||||
{
|
||||
StartTime = original.StartTime,
|
||||
Sample = original.Sample,
|
||||
IsStrong = strong,
|
||||
Type = type
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -3,12 +3,7 @@
|
||||
|
||||
namespace osu.Game.Modes.Taiko.Objects
|
||||
{
|
||||
/// <summary>
|
||||
/// Describes whether a hit is a centre-hit or a rim-hit.
|
||||
/// </summary>
|
||||
public enum HitType
|
||||
public class CentreHit : Hit
|
||||
{
|
||||
Centre,
|
||||
Rim
|
||||
}
|
||||
}
|
@ -8,11 +8,6 @@ namespace osu.Game.Modes.Taiko.Objects
|
||||
{
|
||||
public class Hit : TaikoHitObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether this hit is a centre-hit or a rim-hit.
|
||||
/// </summary>
|
||||
public HitType Type;
|
||||
|
||||
/// <summary>
|
||||
/// The hit window that results in a "GREAT" hit.
|
||||
/// </summary>
|
||||
|
9
osu.Game.Modes.Taiko/Objects/RimHit.cs
Normal file
9
osu.Game.Modes.Taiko/Objects/RimHit.cs
Normal file
@ -0,0 +1,9 @@
|
||||
// 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.Objects
|
||||
{
|
||||
public class RimHit : Hit
|
||||
{
|
||||
}
|
||||
}
|
@ -84,7 +84,7 @@ namespace osu.Game.Modes.Taiko
|
||||
}
|
||||
else if (hit != null)
|
||||
{
|
||||
if (hit.Type == HitType.Centre)
|
||||
if (hit is CentreHit)
|
||||
{
|
||||
if (h.IsStrong)
|
||||
button = LegacyButtonState.Right1 | LegacyButtonState.Right2;
|
||||
|
@ -53,6 +53,7 @@
|
||||
<Compile Include="Judgements\TaikoJudgement.cs" />
|
||||
<Compile Include="Judgements\TaikoHitResult.cs" />
|
||||
<Compile Include="LegacyTaikoReplay.cs" />
|
||||
<Compile Include="Objects\CentreHit.cs" />
|
||||
<Compile Include="Objects\Drawable\DrawableRimHit.cs" />
|
||||
<Compile Include="Objects\Drawable\DrawableStrongRimHit.cs" />
|
||||
<Compile Include="Objects\Drawable\DrawableCentreHit.cs" />
|
||||
@ -70,7 +71,7 @@
|
||||
<Compile Include="Objects\DrumRoll.cs" />
|
||||
<Compile Include="Objects\DrumRollTick.cs" />
|
||||
<Compile Include="Objects\Hit.cs" />
|
||||
<Compile Include="Objects\HitType.cs" />
|
||||
<Compile Include="Objects\RimHit.cs" />
|
||||
<Compile Include="Objects\Swell.cs" />
|
||||
<Compile Include="TaikoAutoReplay.cs" />
|
||||
<Compile Include="Objects\TaikoHitObject.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user