mirror of https://github.com/ppy/osu
Fix rotation not being updated correctly on start time change
This commit is contained in:
parent
c1c0d49bfe
commit
f8fff4074d
|
@ -44,10 +44,11 @@ protected override void LoadComplete()
|
|||
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 @@ private void load()
|
|||
|
||||
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 @@ private void load()
|
|||
_ => 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