mirror of
https://github.com/ppy/osu.git
synced 2025-03-28 01:47:33 +08:00
Make Swells require alternating key hits.
This commit is contained in:
parent
982fcbbf53
commit
3d2c8f19ae
@ -14,6 +14,7 @@ using osu.Game.Modes.Objects.Drawables;
|
|||||||
using osu.Game.Modes.Taiko.Judgements;
|
using osu.Game.Modes.Taiko.Judgements;
|
||||||
using osu.Game.Modes.Taiko.Objects.Drawable.Pieces;
|
using osu.Game.Modes.Taiko.Objects.Drawable.Pieces;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace osu.Game.Modes.Taiko.Objects.Drawable
|
namespace osu.Game.Modes.Taiko.Objects.Drawable
|
||||||
{
|
{
|
||||||
@ -30,11 +31,6 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable
|
|||||||
private const float target_ring_scale = 5f;
|
private const float target_ring_scale = 5f;
|
||||||
private const float inner_ring_alpha = 0.35f;
|
private const float inner_ring_alpha = 0.35f;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The amount of times the user has hit this swell.
|
|
||||||
/// </summary>
|
|
||||||
private int userHits;
|
|
||||||
|
|
||||||
private readonly Swell swell;
|
private readonly Swell swell;
|
||||||
|
|
||||||
private readonly Container bodyContainer;
|
private readonly Container bodyContainer;
|
||||||
@ -43,6 +39,15 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable
|
|||||||
|
|
||||||
private readonly CirclePiece circlePiece;
|
private readonly CirclePiece circlePiece;
|
||||||
|
|
||||||
|
private readonly Key[] rimKeys = { Key.D, Key.K };
|
||||||
|
private readonly Key[] centreKeys = { Key.F, Key.J };
|
||||||
|
private Key[] lastKeySet;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The amount of times the user has hit this swell.
|
||||||
|
/// </summary>
|
||||||
|
private int userHits;
|
||||||
|
|
||||||
private bool hasStarted;
|
private bool hasStarted;
|
||||||
|
|
||||||
public DrawableSwell(Swell swell)
|
public DrawableSwell(Swell swell)
|
||||||
@ -206,6 +211,14 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable
|
|||||||
if (Judgement.Result.HasValue)
|
if (Judgement.Result.HasValue)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// Find the keyset which this key corresponds to
|
||||||
|
var keySet = rimKeys.Contains(key) ? rimKeys : centreKeys;
|
||||||
|
|
||||||
|
// Ensure alternating keysets
|
||||||
|
if (keySet == lastKeySet)
|
||||||
|
return false;
|
||||||
|
lastKeySet = keySet;
|
||||||
|
|
||||||
UpdateJudgement(true);
|
UpdateJudgement(true);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user