1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-07 00:17:21 +08:00

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
1.2 KiB
C#
Raw Normal View History

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
2018-04-13 18:19:50 +09:00
2017-10-10 16:34:01 +09:00
using osu.Framework.Allocation;
2020-02-19 17:55:40 +09:00
using osu.Framework.Graphics;
2020-12-07 12:35:24 +09:00
using osu.Game.Rulesets.Catch.Skinning.Default;
2020-02-19 13:27:15 +09:00
using osu.Game.Skinning;
2018-04-13 18:19:50 +09:00
namespace osu.Game.Rulesets.Catch.Objects.Drawables
2017-10-10 16:34:01 +09:00
{
2020-12-09 10:25:35 +09:00
public partial class DrawableDroplet : DrawablePalpableCatchHitObject
2017-10-10 16:34:01 +09:00
{
public DrawableDroplet()
: this(null)
{
}
public DrawableDroplet(CatchHitObject? h)
2017-10-10 16:34:01 +09:00
: base(h)
{
}
2018-04-13 18:19:50 +09:00
2017-10-10 16:34:01 +09:00
[BackgroundDependencyLoader]
private void load()
{
ScalingContainer.Child = new SkinnableDrawable(
new CatchSkinComponentLookup(CatchSkinComponents.Droplet),
_ => new DropletPiece());
}
2020-02-19 17:55:40 +09:00
protected override void UpdateInitialTransforms()
{
base.UpdateInitialTransforms();
// roughly matches osu-stable
float startRotation = RandomSingle(1) * 20;
2020-02-19 17:55:40 +09:00
double duration = HitObject.TimePreempt + 2000;
ScalingContainer.RotateTo(startRotation).RotateTo(startRotation + 720, duration);
2020-02-19 17:55:40 +09:00
}
2017-10-10 16:34:01 +09:00
}
}