mirror of
https://github.com/ppy/osu.git
synced 2024-12-05 09:42:54 +08:00
User helper function to reduce copy paste
This commit is contained in:
parent
401429feec
commit
966e5bbc8a
@ -33,10 +33,11 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
|
||||
ScaleContainer.ScaleTo(HitObject.Scale * (end_scale + random_scale_range * RNG.NextSingle()))
|
||||
.Then().ScaleTo(HitObject.Scale * end_scale, HitObject.TimePreempt);
|
||||
|
||||
const float random_angle_range = 180;
|
||||
ScaleContainer.RotateTo(getRandomAngle())
|
||||
.Then()
|
||||
.RotateTo(getRandomAngle(), HitObject.TimePreempt);
|
||||
|
||||
ScaleContainer.RotateTo(random_angle_range * (RNG.NextSingle() * 2 - 1))
|
||||
.Then().RotateTo(random_angle_range * (RNG.NextSingle() * 2 - 1), HitObject.TimePreempt);
|
||||
float getRandomAngle() => 180 * (RNG.NextSingle() * 2 - 1);
|
||||
}
|
||||
|
||||
private Color4 getBananaColour()
|
||||
|
Loading…
Reference in New Issue
Block a user