mirror of
https://github.com/ppy/osu
synced 2024-12-17 04:15:37 +00: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.Objects.Drawable.Pieces;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
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 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 Container bodyContainer;
|
||||
@ -43,6 +39,15 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable
|
||||
|
||||
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;
|
||||
|
||||
public DrawableSwell(Swell swell)
|
||||
@ -206,6 +211,14 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable
|
||||
if (Judgement.Result.HasValue)
|
||||
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);
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user