mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 07:43:01 +08:00
Change approach circles to all appear at the same time, but don't adjust AR
This commit is contained in:
parent
3d72ff28c3
commit
588fc750cd
@ -29,12 +29,17 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
public override ModType Type => ModType.Fun;
|
public override ModType Type => ModType.Fun;
|
||||||
|
|
||||||
//mod breaks normal approach circle preempt
|
//mod breaks normal approach circle preempt
|
||||||
private double approachCircleTimePreempt;
|
private double originalPreempt;
|
||||||
|
|
||||||
public void ApplyToBeatmap(IBeatmap beatmap)
|
public void ApplyToBeatmap(IBeatmap beatmap)
|
||||||
{
|
{
|
||||||
|
var firstHitObject = beatmap.HitObjects.OfType<OsuHitObject>().FirstOrDefault();
|
||||||
|
if (firstHitObject == null)
|
||||||
|
return;
|
||||||
|
|
||||||
double lastNewComboTime = 0;
|
double lastNewComboTime = 0;
|
||||||
approachCircleTimePreempt = beatmap.HitObjects.OfType<OsuHitObject>().FirstOrDefault()!.TimePreempt;
|
|
||||||
|
originalPreempt = firstHitObject.TimePreempt;
|
||||||
|
|
||||||
foreach (var obj in beatmap.HitObjects.OfType<OsuHitObject>())
|
foreach (var obj in beatmap.HitObjects.OfType<OsuHitObject>())
|
||||||
{
|
{
|
||||||
@ -72,17 +77,12 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
var hitCircle = drawableHitCircle.HitObject;
|
var hitCircle = drawableHitCircle.HitObject;
|
||||||
var approachCircle = drawableHitCircle.ApproachCircle;
|
var approachCircle = drawableHitCircle.ApproachCircle;
|
||||||
|
|
||||||
approachCircle.ClearTransforms();
|
// Reapply scale, ensuring the AR isn't changes due to the new preempt.
|
||||||
approachCircle.ScaleTo(4);
|
approachCircle.ClearTransforms(targetMember: nameof(approachCircle.Scale));
|
||||||
approachCircle.FadeTo(0);
|
approachCircle.ScaleTo(4 * (float)(hitCircle.TimePreempt / originalPreempt));
|
||||||
|
|
||||||
using (drawableHitCircle.ApproachCircle.BeginAbsoluteSequence(hitCircle.StartTime - approachCircleTimePreempt))
|
using (drawableHitCircle.ApproachCircle.BeginAbsoluteSequence(hitCircle.StartTime - hitCircle.TimePreempt))
|
||||||
{
|
approachCircle.ScaleTo(1, hitCircle.TimePreempt).Then().Expire();
|
||||||
//Redo ApproachCircle animation with correct startTime.
|
|
||||||
approachCircle.LifetimeStart = hitCircle.StartTime - approachCircleTimePreempt;
|
|
||||||
approachCircle.FadeTo(1, Math.Min(hitCircle.TimeFadeIn * 2, hitCircle.TimePreempt));
|
|
||||||
approachCircle.ScaleTo(1, approachCircleTimePreempt).Then().Expire();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user