osu/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableFruit.cs

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

39 lines
1.0 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 09:19:50 +00:00
2016-11-14 09:03:20 +00:00
using osu.Framework.Allocation;
using osu.Framework.Graphics;
2020-12-07 03:35:24 +00:00
using osu.Game.Rulesets.Catch.Skinning.Default;
using osu.Game.Skinning;
2018-04-13 09:19:50 +00:00
namespace osu.Game.Rulesets.Catch.Objects.Drawables
{
public partial class DrawableFruit : DrawablePalpableCatchHitObject
{
public DrawableFruit()
: this(null)
{
}
public DrawableFruit(Fruit? h)
2017-08-08 03:46:37 +00:00
: base(h)
{
}
2018-04-13 09:19:50 +00:00
[BackgroundDependencyLoader]
private void load()
{
ScalingContainer.Child = new SkinnableDrawable(
new CatchSkinComponentLookup(CatchSkinComponents.Fruit),
_ => new FruitPiece());
}
protected override void UpdateInitialTransforms()
2018-01-03 09:26:54 +00:00
{
base.UpdateInitialTransforms();
2018-04-13 09:19:50 +00:00
ScalingContainer.RotateTo((RandomSingle(1) - 0.5f) * 40);
2017-12-31 13:09:07 +00:00
}
}
}