2019-01-24 17:43:03 +09:00
|
|
|
|
// 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
|
|
|
|
|
2016-11-14 18:03:20 +09:00
|
|
|
|
using osu.Framework.Allocation;
|
2020-12-03 12:13:14 +09:00
|
|
|
|
using osu.Framework.Graphics;
|
2020-12-07 12:35:24 +09:00
|
|
|
|
using osu.Game.Rulesets.Catch.Skinning.Default;
|
2020-02-17 18:47:22 +09:00
|
|
|
|
using osu.Game.Skinning;
|
2018-04-13 18:19:50 +09:00
|
|
|
|
|
2020-02-19 18:01:59 +09:00
|
|
|
|
namespace osu.Game.Rulesets.Catch.Objects.Drawables
|
2016-10-13 10:10:15 +09:00
|
|
|
|
{
|
2021-06-07 14:49:37 +09:00
|
|
|
|
public partial class DrawableFruit : DrawablePalpableCatchHitObject
|
2016-10-13 10:10:15 +09:00
|
|
|
|
{
|
2020-11-30 19:07:50 +09:00
|
|
|
|
public DrawableFruit()
|
|
|
|
|
: this(null)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-15 16:27:49 +09:00
|
|
|
|
public DrawableFruit(Fruit? h)
|
2017-08-08 12:46:37 +09:00
|
|
|
|
: base(h)
|
2016-10-13 10:10:15 +09:00
|
|
|
|
{
|
|
|
|
|
}
|
2018-04-13 18:19:50 +09:00
|
|
|
|
|
2016-11-12 19:44:16 +09:00
|
|
|
|
[BackgroundDependencyLoader]
|
2017-08-02 19:37:20 +09:00
|
|
|
|
private void load()
|
|
|
|
|
{
|
2020-12-10 19:42:01 +09:00
|
|
|
|
ScalingContainer.Child = new SkinnableDrawable(
|
2022-11-09 16:04:56 +09:00
|
|
|
|
new CatchSkinComponentLookup(CatchSkinComponents.Fruit),
|
2020-12-10 19:42:01 +09:00
|
|
|
|
_ => new FruitPiece());
|
2020-11-27 10:10:05 +09:00
|
|
|
|
}
|
|
|
|
|
|
2020-12-07 12:59:03 +09:00
|
|
|
|
protected override void UpdateInitialTransforms()
|
2018-01-03 18:26:54 +09:00
|
|
|
|
{
|
2020-12-07 12:59:03 +09:00
|
|
|
|
base.UpdateInitialTransforms();
|
2018-04-13 18:19:50 +09:00
|
|
|
|
|
2020-12-10 19:42:01 +09:00
|
|
|
|
ScalingContainer.RotateTo((RandomSingle(1) - 0.5f) * 40);
|
2017-12-31 22:09:07 +09:00
|
|
|
|
}
|
2016-10-13 10:10:15 +09:00
|
|
|
|
}
|
|
|
|
|
}
|