mirror of
https://github.com/ppy/osu.git
synced 2025-02-10 02:23:21 +08:00
Fix rotation not being updated correctly on start time change
This commit is contained in:
parent
c1c0d49bfe
commit
f8fff4074d
@ -44,10 +44,11 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
|
|||||||
private float startAngle;
|
private float startAngle;
|
||||||
private float endAngle;
|
private float endAngle;
|
||||||
|
|
||||||
protected override void OnApply()
|
protected override void UpdateInitialTransforms()
|
||||||
{
|
{
|
||||||
base.OnApply();
|
base.UpdateInitialTransforms();
|
||||||
|
|
||||||
|
// Important to have this in UpdateInitialTransforms() to it is re-triggered by RefreshStateTransforms().
|
||||||
const float end_scale = 0.6f;
|
const float end_scale = 0.6f;
|
||||||
const float random_scale_range = 1.6f;
|
const float random_scale_range = 1.6f;
|
||||||
|
|
||||||
|
@ -30,11 +30,11 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
|
|||||||
|
|
||||||
private float startRotation;
|
private float startRotation;
|
||||||
|
|
||||||
protected override void OnApply()
|
protected override void UpdateInitialTransforms()
|
||||||
{
|
{
|
||||||
base.OnApply();
|
base.UpdateInitialTransforms();
|
||||||
|
|
||||||
// roughly matches osu-stable
|
// Important to have this in UpdateInitialTransforms() to it is re-triggered by RefreshStateTransforms().
|
||||||
startRotation = RandomSingle(1) * 20;
|
startRotation = RandomSingle(1) * 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,9 +27,11 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
|
|||||||
_ => new FruitPiece());
|
_ => new FruitPiece());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnApply()
|
protected override void UpdateInitialTransforms()
|
||||||
{
|
{
|
||||||
base.OnApply();
|
base.UpdateInitialTransforms();
|
||||||
|
|
||||||
|
// Important to have this in UpdateInitialTransforms() to it is re-triggered by RefreshStateTransforms().
|
||||||
ScalingContainer.Rotation = (RandomSingle(1) - 0.5f) * 40;
|
ScalingContainer.Rotation = (RandomSingle(1) - 0.5f) * 40;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user