mirror of
https://github.com/ppy/osu.git
synced 2025-01-08 00:02:54 +08:00
Merge branch 'master' into fix-carousel-restore-previous-selection
This commit is contained in:
commit
e64a100e8b
@ -97,7 +97,7 @@ platform :ios do
|
|||||||
changelog.gsub!('$BUILD_ID', options[:build])
|
changelog.gsub!('$BUILD_ID', options[:build])
|
||||||
|
|
||||||
pilot(
|
pilot(
|
||||||
wait_processing_interval: 1800,
|
wait_processing_interval: 900,
|
||||||
changelog: changelog,
|
changelog: changelog,
|
||||||
groups: ['osu! supporters', 'public'],
|
groups: ['osu! supporters', 'public'],
|
||||||
distribute_external: true,
|
distribute_external: true,
|
||||||
|
@ -52,6 +52,6 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2020.315.0" />
|
<PackageReference Include="ppy.osu.Game.Resources" Version="2020.315.0" />
|
||||||
<PackageReference Include="ppy.osu.Framework.Android" Version="2020.317.0" />
|
<PackageReference Include="ppy.osu.Framework.Android" Version="2020.319.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -41,7 +41,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
typeof(DrawableSliderTick),
|
typeof(DrawableSliderTick),
|
||||||
typeof(DrawableSliderTail),
|
typeof(DrawableSliderTail),
|
||||||
typeof(DrawableSliderHead),
|
typeof(DrawableSliderHead),
|
||||||
typeof(DrawableRepeatPoint),
|
typeof(DrawableSliderRepeat),
|
||||||
typeof(DrawableOsuHitObject)
|
typeof(DrawableOsuHitObject)
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -146,7 +146,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
|
|
||||||
AddAssert("head samples updated", () => assertSamples(((Slider)slider.HitObject).HeadCircle));
|
AddAssert("head samples updated", () => assertSamples(((Slider)slider.HitObject).HeadCircle));
|
||||||
AddAssert("tick samples not updated", () => ((Slider)slider.HitObject).NestedHitObjects.OfType<SliderTick>().All(assertTickSamples));
|
AddAssert("tick samples not updated", () => ((Slider)slider.HitObject).NestedHitObjects.OfType<SliderTick>().All(assertTickSamples));
|
||||||
AddAssert("repeat samples updated", () => ((Slider)slider.HitObject).NestedHitObjects.OfType<RepeatPoint>().All(assertSamples));
|
AddAssert("repeat samples updated", () => ((Slider)slider.HitObject).NestedHitObjects.OfType<SliderRepeat>().All(assertSamples));
|
||||||
AddAssert("tail has no samples", () => ((Slider)slider.HitObject).TailCircle.Samples.Count == 0);
|
AddAssert("tail has no samples", () => ((Slider)slider.HitObject).TailCircle.Samples.Count == 0);
|
||||||
|
|
||||||
static bool assertTickSamples(SliderTick tick) => tick.Samples.Single().Name == "slidertick";
|
static bool assertTickSamples(SliderTick tick) => tick.Samples.Single().Name == "slidertick";
|
||||||
@ -181,7 +181,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
|
|
||||||
AddAssert("head samples not updated", () => assertSamples(((Slider)slider.HitObject).HeadCircle));
|
AddAssert("head samples not updated", () => assertSamples(((Slider)slider.HitObject).HeadCircle));
|
||||||
AddAssert("tick samples not updated", () => ((Slider)slider.HitObject).NestedHitObjects.OfType<SliderTick>().All(assertTickSamples));
|
AddAssert("tick samples not updated", () => ((Slider)slider.HitObject).NestedHitObjects.OfType<SliderTick>().All(assertTickSamples));
|
||||||
AddAssert("repeat samples not updated", () => ((Slider)slider.HitObject).NestedHitObjects.OfType<RepeatPoint>().All(assertSamples));
|
AddAssert("repeat samples not updated", () => ((Slider)slider.HitObject).NestedHitObjects.OfType<SliderRepeat>().All(assertSamples));
|
||||||
AddAssert("tail has no samples", () => ((Slider)slider.HitObject).TailCircle.Samples.Count == 0);
|
AddAssert("tail has no samples", () => ((Slider)slider.HitObject).TailCircle.Samples.Count == 0);
|
||||||
|
|
||||||
static bool assertTickSamples(SliderTick tick) => tick.Samples.Single().Name == "slidertick";
|
static bool assertTickSamples(SliderTick tick) => tick.Samples.Single().Name == "slidertick";
|
||||||
|
@ -32,7 +32,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
typeof(SliderBall),
|
typeof(SliderBall),
|
||||||
typeof(DrawableSlider),
|
typeof(DrawableSlider),
|
||||||
typeof(DrawableSliderTick),
|
typeof(DrawableSliderTick),
|
||||||
typeof(DrawableRepeatPoint),
|
typeof(DrawableSliderRepeat),
|
||||||
typeof(DrawableOsuHitObject),
|
typeof(DrawableOsuHitObject),
|
||||||
typeof(DrawableSliderHead),
|
typeof(DrawableSliderHead),
|
||||||
typeof(DrawableSliderTail),
|
typeof(DrawableSliderTail),
|
||||||
@ -327,7 +327,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
AddAssert("Tracking dropped", assertMidSliderJudgementFail);
|
AddAssert("Tracking dropped", assertMidSliderJudgementFail);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool assertGreatJudge() => judgementResults.Last().Type == HitResult.Great;
|
private bool assertGreatJudge() => judgementResults.Any() && judgementResults.All(t => t.Type == HitResult.Great);
|
||||||
|
|
||||||
private bool assertHeadMissTailTracked() => judgementResults[^2].Type == HitResult.Great && judgementResults.First().Type == HitResult.Miss;
|
private bool assertHeadMissTailTracked() => judgementResults[^2].Type == HitResult.Great && judgementResults.First().Type == HitResult.Miss;
|
||||||
|
|
||||||
|
16
osu.Game.Rulesets.Osu/Judgements/OsuIgnoreJudgement.cs
Normal file
16
osu.Game.Rulesets.Osu/Judgements/OsuIgnoreJudgement.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Game.Rulesets.Scoring;
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.Osu.Judgements
|
||||||
|
{
|
||||||
|
public class OsuIgnoreJudgement : OsuJudgement
|
||||||
|
{
|
||||||
|
public override bool AffectsCombo => false;
|
||||||
|
|
||||||
|
protected override int NumericResultFor(HitResult result) => 0;
|
||||||
|
|
||||||
|
protected override double HealthIncreaseFor(HitResult result) => 0;
|
||||||
|
}
|
||||||
|
}
|
@ -26,7 +26,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
slider.NestedHitObjects.OfType<SliderTick>().ForEach(h => h.Position = new Vector2(h.Position.X, OsuPlayfield.BASE_SIZE.Y - h.Position.Y));
|
slider.NestedHitObjects.OfType<SliderTick>().ForEach(h => h.Position = new Vector2(h.Position.X, OsuPlayfield.BASE_SIZE.Y - h.Position.Y));
|
||||||
slider.NestedHitObjects.OfType<RepeatPoint>().ForEach(h => h.Position = new Vector2(h.Position.X, OsuPlayfield.BASE_SIZE.Y - h.Position.Y));
|
slider.NestedHitObjects.OfType<SliderRepeat>().ForEach(h => h.Position = new Vector2(h.Position.X, OsuPlayfield.BASE_SIZE.Y - h.Position.Y));
|
||||||
|
|
||||||
foreach (var point in slider.Path.ControlPoints)
|
foreach (var point in slider.Path.ControlPoints)
|
||||||
point.Position.Value = new Vector2(point.Position.Value.X, -point.Position.Value.Y);
|
point.Position.Value = new Vector2(point.Position.Value.X, -point.Position.Value.Y);
|
||||||
|
@ -38,7 +38,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
case DrawableSliderHead _:
|
case DrawableSliderHead _:
|
||||||
case DrawableSliderTail _:
|
case DrawableSliderTail _:
|
||||||
case DrawableSliderTick _:
|
case DrawableSliderTick _:
|
||||||
case DrawableRepeatPoint _:
|
case DrawableSliderRepeat _:
|
||||||
return;
|
return;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -39,7 +39,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
|
|
||||||
// Wiggle the repeat points with the slider instead of independently.
|
// Wiggle the repeat points with the slider instead of independently.
|
||||||
// Also fixes an issue with repeat points being positioned incorrectly.
|
// Also fixes an issue with repeat points being positioned incorrectly.
|
||||||
if (osuObject is RepeatPoint)
|
if (osuObject is SliderRepeat)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Random objRand = new Random((int)osuObject.StartTime);
|
Random objRand = new Random((int)osuObject.StartTime);
|
||||||
|
@ -88,8 +88,6 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
|
|||||||
|
|
||||||
private void refresh()
|
private void refresh()
|
||||||
{
|
{
|
||||||
ClearInternal();
|
|
||||||
|
|
||||||
OsuHitObject osuStart = Start.HitObject;
|
OsuHitObject osuStart = Start.HitObject;
|
||||||
double startTime = osuStart.GetEndTime();
|
double startTime = osuStart.GetEndTime();
|
||||||
|
|
||||||
@ -116,6 +114,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
|
|||||||
double? firstTransformStartTime = null;
|
double? firstTransformStartTime = null;
|
||||||
double finalTransformEndTime = startTime;
|
double finalTransformEndTime = startTime;
|
||||||
|
|
||||||
|
int point = 0;
|
||||||
|
|
||||||
for (int d = (int)(spacing * 1.5); d < distance - spacing; d += spacing)
|
for (int d = (int)(spacing * 1.5); d < distance - spacing; d += spacing)
|
||||||
{
|
{
|
||||||
float fraction = (float)d / distance;
|
float fraction = (float)d / distance;
|
||||||
@ -126,13 +126,18 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
|
|||||||
|
|
||||||
FollowPoint fp;
|
FollowPoint fp;
|
||||||
|
|
||||||
AddInternal(fp = new FollowPoint
|
if (InternalChildren.Count > point)
|
||||||
{
|
{
|
||||||
Position = pointStartPosition,
|
fp = (FollowPoint)InternalChildren[point];
|
||||||
Rotation = rotation,
|
fp.ClearTransforms();
|
||||||
Alpha = 0,
|
}
|
||||||
Scale = new Vector2(1.5f * osuEnd.Scale),
|
else
|
||||||
});
|
AddInternal(fp = new FollowPoint());
|
||||||
|
|
||||||
|
fp.Position = pointStartPosition;
|
||||||
|
fp.Rotation = rotation;
|
||||||
|
fp.Alpha = 0;
|
||||||
|
fp.Scale = new Vector2(1.5f * osuEnd.Scale);
|
||||||
|
|
||||||
if (firstTransformStartTime == null)
|
if (firstTransformStartTime == null)
|
||||||
firstTransformStartTime = fadeInTime;
|
firstTransformStartTime = fadeInTime;
|
||||||
@ -146,8 +151,14 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
|
|||||||
|
|
||||||
finalTransformEndTime = fadeOutTime + osuEnd.TimeFadeIn;
|
finalTransformEndTime = fadeOutTime + osuEnd.TimeFadeIn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
point++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int excessPoints = InternalChildren.Count - point;
|
||||||
|
for (int i = 0; i < excessPoints; i++)
|
||||||
|
RemoveInternal(InternalChildren[^1]);
|
||||||
|
|
||||||
// todo: use Expire() on FollowPoints and take lifetime from them when https://github.com/ppy/osu-framework/issues/3300 is fixed.
|
// todo: use Expire() on FollowPoints and take lifetime from them when https://github.com/ppy/osu-framework/issues/3300 is fixed.
|
||||||
LifetimeStart = firstTransformStartTime ?? startTime;
|
LifetimeStart = firstTransformStartTime ?? startTime;
|
||||||
LifetimeEnd = finalTransformEndTime;
|
LifetimeEnd = finalTransformEndTime;
|
||||||
|
@ -6,13 +6,11 @@ using osuTK;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Rulesets.Objects.Drawables;
|
using osu.Game.Rulesets.Objects.Drawables;
|
||||||
using osu.Game.Rulesets.Osu.Objects.Drawables.Pieces;
|
using osu.Game.Rulesets.Osu.Objects.Drawables.Pieces;
|
||||||
using System.Linq;
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Rulesets.Objects;
|
using osu.Game.Rulesets.Objects;
|
||||||
using osu.Game.Rulesets.Osu.Skinning;
|
using osu.Game.Rulesets.Osu.Skinning;
|
||||||
using osu.Game.Rulesets.Scoring;
|
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
using osu.Game.Skinning;
|
using osu.Game.Skinning;
|
||||||
|
|
||||||
@ -26,12 +24,14 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
public readonly SliderBall Ball;
|
public readonly SliderBall Ball;
|
||||||
public readonly SkinnableDrawable Body;
|
public readonly SkinnableDrawable Body;
|
||||||
|
|
||||||
|
public override bool DisplayResult => false;
|
||||||
|
|
||||||
private PlaySliderBody sliderBody => Body.Drawable as PlaySliderBody;
|
private PlaySliderBody sliderBody => Body.Drawable as PlaySliderBody;
|
||||||
|
|
||||||
private readonly Container<DrawableSliderHead> headContainer;
|
private readonly Container<DrawableSliderHead> headContainer;
|
||||||
private readonly Container<DrawableSliderTail> tailContainer;
|
private readonly Container<DrawableSliderTail> tailContainer;
|
||||||
private readonly Container<DrawableSliderTick> tickContainer;
|
private readonly Container<DrawableSliderTick> tickContainer;
|
||||||
private readonly Container<DrawableRepeatPoint> repeatContainer;
|
private readonly Container<DrawableSliderRepeat> repeatContainer;
|
||||||
|
|
||||||
private readonly Slider slider;
|
private readonly Slider slider;
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
{
|
{
|
||||||
Body = new SkinnableDrawable(new OsuSkinComponent(OsuSkinComponents.SliderBody), _ => new DefaultSliderBody(), confineMode: ConfineMode.NoScaling),
|
Body = new SkinnableDrawable(new OsuSkinComponent(OsuSkinComponents.SliderBody), _ => new DefaultSliderBody(), confineMode: ConfineMode.NoScaling),
|
||||||
tickContainer = new Container<DrawableSliderTick> { RelativeSizeAxes = Axes.Both },
|
tickContainer = new Container<DrawableSliderTick> { RelativeSizeAxes = Axes.Both },
|
||||||
repeatContainer = new Container<DrawableRepeatPoint> { RelativeSizeAxes = Axes.Both },
|
repeatContainer = new Container<DrawableSliderRepeat> { RelativeSizeAxes = Axes.Both },
|
||||||
Ball = new SliderBall(s, this)
|
Ball = new SliderBall(s, this)
|
||||||
{
|
{
|
||||||
GetInitialHitAction = () => HeadCircle.HitAction,
|
GetInitialHitAction = () => HeadCircle.HitAction,
|
||||||
@ -100,7 +100,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
tickContainer.Add(tick);
|
tickContainer.Add(tick);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DrawableRepeatPoint repeat:
|
case DrawableSliderRepeat repeat:
|
||||||
repeatContainer.Add(repeat);
|
repeatContainer.Add(repeat);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -129,8 +129,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
case SliderTick tick:
|
case SliderTick tick:
|
||||||
return new DrawableSliderTick(tick) { Position = tick.Position - slider.Position };
|
return new DrawableSliderTick(tick) { Position = tick.Position - slider.Position };
|
||||||
|
|
||||||
case RepeatPoint repeat:
|
case SliderRepeat repeat:
|
||||||
return new DrawableRepeatPoint(repeat, this) { Position = repeat.Position - slider.Position };
|
return new DrawableSliderRepeat(repeat, this) { Position = repeat.Position - slider.Position };
|
||||||
}
|
}
|
||||||
|
|
||||||
return base.CreateNestedHitObject(hitObject);
|
return base.CreateNestedHitObject(hitObject);
|
||||||
@ -193,22 +193,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
if (userTriggered || Time.Current < slider.EndTime)
|
if (userTriggered || Time.Current < slider.EndTime)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ApplyResult(r =>
|
ApplyResult(r => r.Type = r.Judgement.MaxResult);
|
||||||
{
|
|
||||||
var judgementsCount = NestedHitObjects.Count;
|
|
||||||
var judgementsHit = NestedHitObjects.Count(h => h.IsHit);
|
|
||||||
|
|
||||||
var hitFraction = (double)judgementsHit / judgementsCount;
|
|
||||||
|
|
||||||
if (hitFraction == 1 && HeadCircle.Result.Type == HitResult.Great)
|
|
||||||
r.Type = HitResult.Great;
|
|
||||||
else if (hitFraction >= 0.5 && HeadCircle.Result.Type >= HitResult.Good)
|
|
||||||
r.Type = HitResult.Good;
|
|
||||||
else if (hitFraction > 0)
|
|
||||||
r.Type = HitResult.Meh;
|
|
||||||
else
|
|
||||||
r.Type = HitResult.Miss;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void UpdateStateTransforms(ArmedState state)
|
protected override void UpdateStateTransforms(ArmedState state)
|
||||||
|
@ -14,19 +14,19 @@ using osuTK;
|
|||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||||
{
|
{
|
||||||
public class DrawableRepeatPoint : DrawableOsuHitObject, ITrackSnaking
|
public class DrawableSliderRepeat : DrawableOsuHitObject, ITrackSnaking
|
||||||
{
|
{
|
||||||
private readonly RepeatPoint repeatPoint;
|
private readonly SliderRepeat sliderRepeat;
|
||||||
private readonly DrawableSlider drawableSlider;
|
private readonly DrawableSlider drawableSlider;
|
||||||
|
|
||||||
private double animDuration;
|
private double animDuration;
|
||||||
|
|
||||||
private readonly Drawable scaleContainer;
|
private readonly Drawable scaleContainer;
|
||||||
|
|
||||||
public DrawableRepeatPoint(RepeatPoint repeatPoint, DrawableSlider drawableSlider)
|
public DrawableSliderRepeat(SliderRepeat sliderRepeat, DrawableSlider drawableSlider)
|
||||||
: base(repeatPoint)
|
: base(sliderRepeat)
|
||||||
{
|
{
|
||||||
this.repeatPoint = repeatPoint;
|
this.sliderRepeat = sliderRepeat;
|
||||||
this.drawableSlider = drawableSlider;
|
this.drawableSlider = drawableSlider;
|
||||||
|
|
||||||
Size = new Vector2(OsuHitObject.OBJECT_RADIUS * 2);
|
Size = new Vector2(OsuHitObject.OBJECT_RADIUS * 2);
|
||||||
@ -48,13 +48,13 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
|
|
||||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||||
{
|
{
|
||||||
if (repeatPoint.StartTime <= Time.Current)
|
if (sliderRepeat.StartTime <= Time.Current)
|
||||||
ApplyResult(r => r.Type = drawableSlider.Tracking.Value ? HitResult.Great : HitResult.Miss);
|
ApplyResult(r => r.Type = drawableSlider.Tracking.Value ? HitResult.Great : HitResult.Miss);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void UpdateInitialTransforms()
|
protected override void UpdateInitialTransforms()
|
||||||
{
|
{
|
||||||
animDuration = Math.Min(300, repeatPoint.SpanDuration);
|
animDuration = Math.Min(300, sliderRepeat.SpanDuration);
|
||||||
|
|
||||||
this.Animate(
|
this.Animate(
|
||||||
d => d.FadeIn(animDuration),
|
d => d.FadeIn(animDuration),
|
||||||
@ -87,7 +87,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
|
|
||||||
public void UpdateSnakingPosition(Vector2 start, Vector2 end)
|
public void UpdateSnakingPosition(Vector2 start, Vector2 end)
|
||||||
{
|
{
|
||||||
bool isRepeatAtEnd = repeatPoint.RepeatIndex % 2 == 0;
|
bool isRepeatAtEnd = sliderRepeat.RepeatIndex % 2 == 0;
|
||||||
List<Vector2> curve = ((PlaySliderBody)drawableSlider.Body.Drawable).CurrentCurve;
|
List<Vector2> curve = ((PlaySliderBody)drawableSlider.Body.Drawable).CurrentCurve;
|
||||||
|
|
||||||
Position = isRepeatAtEnd ? end : start;
|
Position = isRepeatAtEnd ? end : start;
|
@ -46,7 +46,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||||
{
|
{
|
||||||
if (!userTriggered && timeOffset >= 0)
|
if (!userTriggered && timeOffset >= 0)
|
||||||
ApplyResult(r => r.Type = Tracking ? HitResult.Great : HitResult.Miss);
|
ApplyResult(r => r.Type = Tracking ? r.Judgement.MaxResult : HitResult.Miss);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updatePosition() => Position = HitObject.Position - slider.Position;
|
private void updatePosition() => Position = HitObject.Position - slider.Position;
|
||||||
|
@ -64,7 +64,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||||
{
|
{
|
||||||
if (timeOffset >= 0)
|
if (timeOffset >= 0)
|
||||||
ApplyResult(r => r.Type = Tracking ? HitResult.Great : HitResult.Miss);
|
ApplyResult(r => r.Type = Tracking ? r.Judgement.MaxResult : HitResult.Miss);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void UpdateInitialTransforms()
|
protected override void UpdateInitialTransforms()
|
||||||
|
@ -177,7 +177,7 @@ namespace osu.Game.Rulesets.Osu.Objects
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SliderEventType.Repeat:
|
case SliderEventType.Repeat:
|
||||||
AddNested(new RepeatPoint
|
AddNested(new SliderRepeat
|
||||||
{
|
{
|
||||||
RepeatIndex = e.SpanIndex,
|
RepeatIndex = e.SpanIndex,
|
||||||
SpanDuration = SpanDuration,
|
SpanDuration = SpanDuration,
|
||||||
@ -223,7 +223,7 @@ namespace osu.Game.Rulesets.Osu.Objects
|
|||||||
foreach (var tick in NestedHitObjects.OfType<SliderTick>())
|
foreach (var tick in NestedHitObjects.OfType<SliderTick>())
|
||||||
tick.Samples = sampleList;
|
tick.Samples = sampleList;
|
||||||
|
|
||||||
foreach (var repeat in NestedHitObjects.OfType<RepeatPoint>())
|
foreach (var repeat in NestedHitObjects.OfType<SliderRepeat>())
|
||||||
repeat.Samples = getNodeSamples(repeat.RepeatIndex + 1);
|
repeat.Samples = getNodeSamples(repeat.RepeatIndex + 1);
|
||||||
|
|
||||||
if (HeadCircle != null)
|
if (HeadCircle != null)
|
||||||
@ -233,7 +233,7 @@ namespace osu.Game.Rulesets.Osu.Objects
|
|||||||
private IList<HitSampleInfo> getNodeSamples(int nodeIndex) =>
|
private IList<HitSampleInfo> getNodeSamples(int nodeIndex) =>
|
||||||
nodeIndex < NodeSamples.Count ? NodeSamples[nodeIndex] : Samples;
|
nodeIndex < NodeSamples.Count ? NodeSamples[nodeIndex] : Samples;
|
||||||
|
|
||||||
public override Judgement CreateJudgement() => new OsuJudgement();
|
public override Judgement CreateJudgement() => new OsuIgnoreJudgement();
|
||||||
|
|
||||||
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
|
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ using osu.Game.Rulesets.Scoring;
|
|||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Objects
|
namespace osu.Game.Rulesets.Osu.Objects
|
||||||
{
|
{
|
||||||
public class RepeatPoint : OsuHitObject
|
public class SliderRepeat : OsuHitObject
|
||||||
{
|
{
|
||||||
public int RepeatIndex { get; set; }
|
public int RepeatIndex { get; set; }
|
||||||
public double SpanDuration { get; set; }
|
public double SpanDuration { get; set; }
|
||||||
@ -28,8 +28,15 @@ namespace osu.Game.Rulesets.Osu.Objects
|
|||||||
TimePreempt = Math.Min(SpanDuration * 2, TimePreempt);
|
TimePreempt = Math.Min(SpanDuration * 2, TimePreempt);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Judgement CreateJudgement() => new OsuJudgement();
|
|
||||||
|
|
||||||
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
|
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
|
||||||
|
|
||||||
|
public override Judgement CreateJudgement() => new SliderRepeatJudgement();
|
||||||
|
|
||||||
|
public class SliderRepeatJudgement : OsuJudgement
|
||||||
|
{
|
||||||
|
public override bool IsBonus => true;
|
||||||
|
|
||||||
|
protected override int NumericResultFor(HitResult result) => result == MaxResult ? 30 : 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -22,8 +22,8 @@ namespace osu.Game.Rulesets.Osu.Objects
|
|||||||
pathVersion.BindValueChanged(_ => Position = slider.EndPosition);
|
pathVersion.BindValueChanged(_ => Position = slider.EndPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Judgement CreateJudgement() => new IgnoreJudgement();
|
|
||||||
|
|
||||||
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
|
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
|
||||||
|
|
||||||
|
public override Judgement CreateJudgement() => new SliderRepeat.SliderRepeatJudgement();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,8 +30,15 @@ namespace osu.Game.Rulesets.Osu.Objects
|
|||||||
TimePreempt = (StartTime - SpanStartTime) / 2 + offset;
|
TimePreempt = (StartTime - SpanStartTime) / 2 + offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Judgement CreateJudgement() => new OsuJudgement();
|
|
||||||
|
|
||||||
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
|
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
|
||||||
|
|
||||||
|
public override Judgement CreateJudgement() => new SliderTickJudgement();
|
||||||
|
|
||||||
|
public class SliderTickJudgement : OsuJudgement
|
||||||
|
{
|
||||||
|
public override bool IsBonus => true;
|
||||||
|
|
||||||
|
protected override int NumericResultFor(HitResult result) => result == MaxResult ? 10 : 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -387,6 +387,10 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
private void onCompletion()
|
private void onCompletion()
|
||||||
{
|
{
|
||||||
|
// screen may be in the exiting transition phase.
|
||||||
|
if (!this.IsCurrentScreen())
|
||||||
|
return;
|
||||||
|
|
||||||
// Only show the completion screen if the player hasn't failed
|
// Only show the completion screen if the player hasn't failed
|
||||||
if (HealthProcessor.HasFailed || completionProgressDelegate != null)
|
if (HealthProcessor.HasFailed || completionProgressDelegate != null)
|
||||||
return;
|
return;
|
||||||
@ -581,7 +585,7 @@ namespace osu.Game.Screens.Play
|
|||||||
if (completionProgressDelegate != null && !completionProgressDelegate.Cancelled && !completionProgressDelegate.Completed)
|
if (completionProgressDelegate != null && !completionProgressDelegate.Cancelled && !completionProgressDelegate.Completed)
|
||||||
{
|
{
|
||||||
// proceed to result screen if beatmap already finished playing
|
// proceed to result screen if beatmap already finished playing
|
||||||
scheduleGotoRanking();
|
completionProgressDelegate.RunTask();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -622,8 +626,16 @@ namespace osu.Game.Screens.Play
|
|||||||
completionProgressDelegate = Schedule(delegate
|
completionProgressDelegate = Schedule(delegate
|
||||||
{
|
{
|
||||||
var score = CreateScore();
|
var score = CreateScore();
|
||||||
|
|
||||||
if (DrawableRuleset.ReplayScore == null)
|
if (DrawableRuleset.ReplayScore == null)
|
||||||
scoreManager.Import(score).ContinueWith(_ => Schedule(() => this.Push(CreateResults(score))));
|
{
|
||||||
|
scoreManager.Import(score).ContinueWith(_ => Schedule(() =>
|
||||||
|
{
|
||||||
|
// screen may be in the exiting transition phase.
|
||||||
|
if (this.IsCurrentScreen())
|
||||||
|
this.Push(CreateResults(score));
|
||||||
|
}));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
this.Push(CreateResults(score));
|
this.Push(CreateResults(score));
|
||||||
});
|
});
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.6" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.6" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2020.315.0" />
|
<PackageReference Include="ppy.osu.Game.Resources" Version="2020.315.0" />
|
||||||
<PackageReference Include="ppy.osu.Framework" Version="2020.317.0" />
|
<PackageReference Include="ppy.osu.Framework" Version="2020.319.0" />
|
||||||
<PackageReference Include="Sentry" Version="2.1.0" />
|
<PackageReference Include="Sentry" Version="2.1.0" />
|
||||||
<PackageReference Include="SharpCompress" Version="0.24.0" />
|
<PackageReference Include="SharpCompress" Version="0.24.0" />
|
||||||
<PackageReference Include="NUnit" Version="3.12.0" />
|
<PackageReference Include="NUnit" Version="3.12.0" />
|
||||||
|
@ -71,7 +71,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup Label="Package References">
|
<ItemGroup Label="Package References">
|
||||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2020.315.0" />
|
<PackageReference Include="ppy.osu.Game.Resources" Version="2020.315.0" />
|
||||||
<PackageReference Include="ppy.osu.Framework.iOS" Version="2020.317.0" />
|
<PackageReference Include="ppy.osu.Framework.iOS" Version="2020.319.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<!-- Xamarin.iOS does not automatically handle transitive dependencies from NuGet packages. -->
|
<!-- Xamarin.iOS does not automatically handle transitive dependencies from NuGet packages. -->
|
||||||
<ItemGroup Label="Transitive Dependencies">
|
<ItemGroup Label="Transitive Dependencies">
|
||||||
@ -79,7 +79,7 @@
|
|||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.6" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.6" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.6" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.6" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||||
<PackageReference Include="ppy.osu.Framework" Version="2020.317.0" />
|
<PackageReference Include="ppy.osu.Framework" Version="2020.319.0" />
|
||||||
<PackageReference Include="SharpCompress" Version="0.24.0" />
|
<PackageReference Include="SharpCompress" Version="0.24.0" />
|
||||||
<PackageReference Include="NUnit" Version="3.12.0" />
|
<PackageReference Include="NUnit" Version="3.12.0" />
|
||||||
<PackageReference Include="SharpRaven" Version="2.4.0" />
|
<PackageReference Include="SharpRaven" Version="2.4.0" />
|
||||||
|
Loading…
Reference in New Issue
Block a user