mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 17:23:22 +08:00
Add droplet rotation animation
This commit is contained in:
parent
e1140d7c91
commit
7b27f6b378
@ -2,6 +2,8 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Utils;
|
||||||
using osu.Game.Rulesets.Catch.Objects.Drawable.Pieces;
|
using osu.Game.Rulesets.Catch.Objects.Drawable.Pieces;
|
||||||
using osu.Game.Skinning;
|
using osu.Game.Skinning;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
@ -27,5 +29,16 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
|||||||
AccentColour = { Value = Color4.White }
|
AccentColour = { Value = Color4.White }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void UpdateInitialTransforms()
|
||||||
|
{
|
||||||
|
base.UpdateInitialTransforms();
|
||||||
|
|
||||||
|
// roughly matches osu-stable
|
||||||
|
float startRotation = RNG.NextSingle() * 20;
|
||||||
|
double duration = HitObject.TimePreempt + 2000;
|
||||||
|
|
||||||
|
this.RotateTo(startRotation).RotateTo(startRotation + 720, duration);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user