2020-12-07 12:56:22 +08: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.
|
|
|
|
|
|
|
|
using osu.Framework.Bindables;
|
2021-06-07 12:59:17 +08:00
|
|
|
using osu.Game.Rulesets.Catch.Objects;
|
2020-12-07 12:56:22 +08:00
|
|
|
using osuTK;
|
|
|
|
|
2020-12-07 17:57:42 +08:00
|
|
|
namespace osu.Game.Rulesets.Catch.Skinning.Default
|
2020-12-07 12:56:22 +08:00
|
|
|
{
|
|
|
|
public class FruitPulpFormation : PulpFormation
|
|
|
|
{
|
|
|
|
public readonly Bindable<FruitVisualRepresentation> VisualRepresentation = new Bindable<FruitVisualRepresentation>();
|
|
|
|
|
|
|
|
protected override void LoadComplete()
|
|
|
|
{
|
|
|
|
base.LoadComplete();
|
|
|
|
|
|
|
|
VisualRepresentation.BindValueChanged(setFormation, true);
|
|
|
|
}
|
|
|
|
|
|
|
|
private void setFormation(ValueChangedEvent<FruitVisualRepresentation> visualRepresentation)
|
|
|
|
{
|
|
|
|
Clear();
|
|
|
|
|
|
|
|
switch (visualRepresentation.NewValue)
|
|
|
|
{
|
|
|
|
case FruitVisualRepresentation.Pear:
|
2020-12-08 09:32:46 +08:00
|
|
|
AddPulp(new Vector2(0, -0.33f), new Vector2(SMALL_PULP));
|
|
|
|
AddPulp(PositionAt(60, DISTANCE_FROM_CENTRE_3), new Vector2(LARGE_PULP_3));
|
|
|
|
AddPulp(PositionAt(180, DISTANCE_FROM_CENTRE_3), new Vector2(LARGE_PULP_3));
|
|
|
|
AddPulp(PositionAt(300, DISTANCE_FROM_CENTRE_3), new Vector2(LARGE_PULP_3));
|
2020-12-07 12:56:22 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
case FruitVisualRepresentation.Grape:
|
2020-12-08 09:32:46 +08:00
|
|
|
AddPulp(new Vector2(0, -0.25f), new Vector2(SMALL_PULP));
|
|
|
|
AddPulp(PositionAt(0, DISTANCE_FROM_CENTRE_3), new Vector2(LARGE_PULP_3));
|
|
|
|
AddPulp(PositionAt(120, DISTANCE_FROM_CENTRE_3), new Vector2(LARGE_PULP_3));
|
|
|
|
AddPulp(PositionAt(240, DISTANCE_FROM_CENTRE_3), new Vector2(LARGE_PULP_3));
|
2020-12-07 12:56:22 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
case FruitVisualRepresentation.Pineapple:
|
2020-12-08 09:32:46 +08:00
|
|
|
AddPulp(new Vector2(0, -0.3f), new Vector2(SMALL_PULP));
|
|
|
|
AddPulp(PositionAt(45, DISTANCE_FROM_CENTRE_4), new Vector2(LARGE_PULP_4));
|
|
|
|
AddPulp(PositionAt(135, DISTANCE_FROM_CENTRE_4), new Vector2(LARGE_PULP_4));
|
|
|
|
AddPulp(PositionAt(225, DISTANCE_FROM_CENTRE_4), new Vector2(LARGE_PULP_4));
|
|
|
|
AddPulp(PositionAt(315, DISTANCE_FROM_CENTRE_4), new Vector2(LARGE_PULP_4));
|
2020-12-07 12:56:22 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
case FruitVisualRepresentation.Raspberry:
|
2020-12-08 09:32:46 +08:00
|
|
|
AddPulp(new Vector2(0, -0.34f), new Vector2(SMALL_PULP));
|
|
|
|
AddPulp(PositionAt(0, DISTANCE_FROM_CENTRE_4), new Vector2(LARGE_PULP_4));
|
|
|
|
AddPulp(PositionAt(90, DISTANCE_FROM_CENTRE_4), new Vector2(LARGE_PULP_4));
|
|
|
|
AddPulp(PositionAt(180, DISTANCE_FROM_CENTRE_4), new Vector2(LARGE_PULP_4));
|
|
|
|
AddPulp(PositionAt(270, DISTANCE_FROM_CENTRE_4), new Vector2(LARGE_PULP_4));
|
2020-12-07 12:56:22 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|