From f8c1f4dd582ea573060fee5fbb6e66cc1a9bb531 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 29 Nov 2016 21:40:24 +0900 Subject: [PATCH] Add basic slider judgement handling. --- .../Objects/Drawables/DrawableSlider.cs | 12 ++++++++++++ .../Modes/Objects/Drawables/DrawableHitObject.cs | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/osu.Game.Mode.Osu/Objects/Drawables/DrawableSlider.cs b/osu.Game.Mode.Osu/Objects/Drawables/DrawableSlider.cs index 1d55d704c4..df79953eae 100644 --- a/osu.Game.Mode.Osu/Objects/Drawables/DrawableSlider.cs +++ b/osu.Game.Mode.Osu/Objects/Drawables/DrawableSlider.cs @@ -75,6 +75,18 @@ namespace osu.Game.Modes.Osu.Objects.Drawables ball.Position = slider.Curve.PositionAt(t); } + protected override void CheckJudgement(bool userTriggered) + { + var j = Judgement as OsuJudgementInfo; + var sc = startCircle.Judgement as OsuJudgementInfo; + + if (!userTriggered && Time.Current >= HitObject.EndTime) + { + j.Score = sc.Score; + j.Result = sc.Result; + } + } + protected override void UpdateState(ArmedState state) { base.UpdateState(state); diff --git a/osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs b/osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs index f00a24d79e..53d3b1bafc 100644 --- a/osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs +++ b/osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs @@ -17,7 +17,7 @@ namespace osu.Game.Modes.Objects.Drawables public Container ChildObjects; - protected JudgementInfo Judgement; + public JudgementInfo Judgement; public abstract JudgementInfo CreateJudgementInfo(); @@ -84,7 +84,7 @@ namespace osu.Game.Modes.Objects.Drawables protected virtual void CheckJudgement(bool userTriggered) { - + //todo: consider making abstract. } protected override void Update()