public override void OnReleased(RushAction action) { if (!LaneMatchesAction(action)) { return; } pressCount--; if (pressCount > 0 || AllJudged) { return; } if (HasBroken.Value || HoldStartTime == null || HoldEndTime != null) { return; } HoldEndTime = Time.Current; var tailOffset = Time.Current - Tail.HitObject.StartTime; tailOffset /= DrawableNoteSheetTail.RELEASE_WINDOW_LENIENCE; if (CompletionAmount < REQUIRED_COMPLETION) { HasBroken.Value = true; } else if (Tail.HitObject.HitWindows.CanBeHit(tailOffset)) { Tail.UpdateResult(); HasBroken.Value = !Tail.IsHit; } }
public override bool OnPressed(RushAction action) { if (AllJudged) { return(false); } if (!Air.AllJudged && Air.LaneMatchesAction(action)) { Air.UpdateResult(); } else if (!Ground.AllJudged && Ground.LaneMatchesAction(action)) { Ground.UpdateResult(); } else { return(false); } if (Air.AllJudged && Ground.AllJudged) { UpdateResult(true); } return(true); }
public override bool OnPressed(RushAction action) { if (!LaneMatchesAction(action) || Head.Judged) { return(false); } UpdateResult(true); return(Head.Judged); }
public override bool OnPressed(RushAction action) { if (!LaneMatchesAction(action) || AllJudged) { return(false); } if (!CheckHittable(this)) { return(false); } return(UpdateResult(true)); }
public override bool OnPressed(RushAction action) { if (AllJudged) { return(false); } var airResult = !Air.AllJudged && Air.LaneMatchesAction(action) && Air.UpdateResult(true); var groundResult = !Ground.AllJudged && Ground.LaneMatchesAction(action) && Ground.UpdateResult(true); if (Air.AllJudged && Ground.AllJudged) { return(UpdateResult(true)); } return(airResult || groundResult); }
public override bool OnPressed(RushAction action) { if (!action.IsLaneAction()) { return(false); } if (!LaneMatchesAction(action) || Head.Judged) { return(false); } if (!CheckHittable(this)) { return(false); } UpdateResult(true); return(Head.Judged); }
public override void OnReleased(RushAction action) { if (!LaneMatchesAction(action)) { return; } // Check if there was also another action holding the same note sheet, // and use it in replace to this released one if so. (support for switching keys during hold) if (ActionInputManager.PressedActions.Count(LaneMatchesAction) > 1) { return; } // Note sheet not held yet (i.e. not our time yet) or already broken / finished. if (!Head.IsHit || Judged) { return; } UpdateResult(true); }
public override Replay Generate() { var pointGroups = generateActionPoints().GroupBy(a => a.Time).OrderBy(g => g.First().Time); var actions = new List <RushAction>(); RushAction nextAir = RushAction.AirPrimary; RushAction nextGround = RushAction.GroundPrimary; foreach (var group in pointGroups) { foreach (var point in group) { switch (point) { case HitPoint _: actions.Add(point.Lane == LanedHitLane.Air ? nextAir : nextGround); break; case ReleasePoint _: actions.Remove(point.Lane == LanedHitLane.Air ? nextAir : nextGround); if (point.Lane == LanedHitLane.Air) { nextAir = nextAir == RushAction.AirPrimary ? RushAction.AirSecondary : RushAction.AirPrimary; } else { nextGround = nextGround == RushAction.GroundPrimary ? RushAction.GroundSecondary : RushAction.GroundPrimary; } break; } } Replay.Frames.Add(new RushReplayFrame(group.First().Time, actions.ToArray())); } return(Replay); }
public override bool OnPressed(RushAction action) { if (AllJudged || HasBroken.Value) { return(false); } if (!LaneMatchesAction(action)) { return(false); } pressCount++; if (pressCount > 1) { return(true); } beginHoldAt(Time.Current - Head.HitObject.StartTime); Head.UpdateResult(); return(true); }
public override bool OnPressed(RushAction action) => false;
public override bool OnPressed(RushAction action) => false; // Handled by the note sheet object itself. public override void OnReleased(RushAction action) { }
public override bool OnPressed(RushAction action) => false; // Handled by the note sheet object itself.
public override bool OnPressed(RushAction action) => UpdateResult(true);
public virtual void OnReleased(RushAction action) { }
public virtual bool OnPressed(RushAction action) => false;
public override bool OnPressed(RushAction action) => false; // Handled by the hold note
public static LanedHitLane Lane(this RushAction action) => action switch {
public virtual bool LaneMatchesAction(RushAction action) => action.Lane() == HitObject.Lane;
public static bool IsLaneAction(this RushAction action) => action < RushAction.Fever;
public override Replay Generate() { var pointGroups = generateActionPoints().GroupBy(a => a.Time).OrderBy(g => g.First().Time); var actions = new List <RushAction>(); RushAction nextAir = RushAction.AirPrimary; RushAction nextGround = RushAction.GroundPrimary; int airCount = 0, groundCount = 0; foreach (var group in pointGroups) { foreach (var point in group) { switch (point) { case HitPoint _: if (point.Lane == LanedHitLane.Air) { airCount++; if (airCount == 1) { actions.Add(nextAir); } } else { groundCount++; if (groundCount == 1) { actions.Add(nextGround); } } break; case ReleasePoint _: if (point.Lane == LanedHitLane.Air) { airCount--; if (airCount == 0) { actions.Remove(nextAir); nextAir = nextAir == RushAction.AirPrimary ? RushAction.AirSecondary : RushAction.AirPrimary; } } else { groundCount--; if (groundCount == 0) { actions.Remove(nextGround); nextGround = nextGround == RushAction.GroundPrimary ? RushAction.GroundSecondary : RushAction.GroundPrimary; } } break; } } Replay.Frames.Add(new RushReplayFrame(group.First().Time, actions.ToArray()) { FeverActivationMode = FeverActivationMode.Automatic, }); } return(Replay); }
public override bool OnPressed(RushAction action) => action.IsLaneAction() && UpdateResult(true);