mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 15:27:30 +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 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 random_scale_range = 1.6f;
|
||||
|
||||
|
@ -30,11 +30,11 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -27,9 +27,11 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
|
||||
_ => 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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user