mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 09:57:21 +09:00
Rename things in PulpFormation
This commit is contained in:
parent
3cbdaf5960
commit
4da6717d0e
@ -9,8 +9,8 @@ namespace osu.Game.Rulesets.Catch.Skinning.Default
|
|||||||
{
|
{
|
||||||
public BananaPulpFormation()
|
public BananaPulpFormation()
|
||||||
{
|
{
|
||||||
Add(new Vector2(0, -0.3f), new Vector2(SMALL_PULP));
|
AddPulp(new Vector2(0, -0.3f), new Vector2(SMALL_PULP));
|
||||||
Add(new Vector2(0, 0.05f), new Vector2(LARGE_PULP_4 * 0.8f, LARGE_PULP_4 * 2.5f));
|
AddPulp(new Vector2(0, 0.05f), new Vector2(LARGE_PULP_4 * 0.8f, LARGE_PULP_4 * 2.5f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,33 +25,33 @@ namespace osu.Game.Rulesets.Catch.Skinning.Default
|
|||||||
switch (visualRepresentation.NewValue)
|
switch (visualRepresentation.NewValue)
|
||||||
{
|
{
|
||||||
case FruitVisualRepresentation.Pear:
|
case FruitVisualRepresentation.Pear:
|
||||||
Add(new Vector2(0, -0.33f), new Vector2(SMALL_PULP));
|
AddPulp(new Vector2(0, -0.33f), new Vector2(SMALL_PULP));
|
||||||
Add(PositionAt(60, DISTANCE_FROM_CENTRE_3), new Vector2(LARGE_PULP_3));
|
AddPulp(PositionAt(60, DISTANCE_FROM_CENTRE_3), new Vector2(LARGE_PULP_3));
|
||||||
Add(PositionAt(180, DISTANCE_FROM_CENTRE_3), new Vector2(LARGE_PULP_3));
|
AddPulp(PositionAt(180, DISTANCE_FROM_CENTRE_3), new Vector2(LARGE_PULP_3));
|
||||||
Add(PositionAt(300, DISTANCE_FROM_CENTRE_3), new Vector2(LARGE_PULP_3));
|
AddPulp(PositionAt(300, DISTANCE_FROM_CENTRE_3), new Vector2(LARGE_PULP_3));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FruitVisualRepresentation.Grape:
|
case FruitVisualRepresentation.Grape:
|
||||||
Add(new Vector2(0, -0.25f), new Vector2(SMALL_PULP));
|
AddPulp(new Vector2(0, -0.25f), new Vector2(SMALL_PULP));
|
||||||
Add(PositionAt(0, DISTANCE_FROM_CENTRE_3), new Vector2(LARGE_PULP_3));
|
AddPulp(PositionAt(0, DISTANCE_FROM_CENTRE_3), new Vector2(LARGE_PULP_3));
|
||||||
Add(PositionAt(120, DISTANCE_FROM_CENTRE_3), new Vector2(LARGE_PULP_3));
|
AddPulp(PositionAt(120, DISTANCE_FROM_CENTRE_3), new Vector2(LARGE_PULP_3));
|
||||||
Add(PositionAt(240, DISTANCE_FROM_CENTRE_3), new Vector2(LARGE_PULP_3));
|
AddPulp(PositionAt(240, DISTANCE_FROM_CENTRE_3), new Vector2(LARGE_PULP_3));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FruitVisualRepresentation.Pineapple:
|
case FruitVisualRepresentation.Pineapple:
|
||||||
Add(new Vector2(0, -0.3f), new Vector2(SMALL_PULP));
|
AddPulp(new Vector2(0, -0.3f), new Vector2(SMALL_PULP));
|
||||||
Add(PositionAt(45, DISTANCE_FROM_CENTRE_4), new Vector2(LARGE_PULP_4));
|
AddPulp(PositionAt(45, DISTANCE_FROM_CENTRE_4), new Vector2(LARGE_PULP_4));
|
||||||
Add(PositionAt(135, DISTANCE_FROM_CENTRE_4), new Vector2(LARGE_PULP_4));
|
AddPulp(PositionAt(135, DISTANCE_FROM_CENTRE_4), new Vector2(LARGE_PULP_4));
|
||||||
Add(PositionAt(225, DISTANCE_FROM_CENTRE_4), new Vector2(LARGE_PULP_4));
|
AddPulp(PositionAt(225, DISTANCE_FROM_CENTRE_4), new Vector2(LARGE_PULP_4));
|
||||||
Add(PositionAt(315, DISTANCE_FROM_CENTRE_4), new Vector2(LARGE_PULP_4));
|
AddPulp(PositionAt(315, DISTANCE_FROM_CENTRE_4), new Vector2(LARGE_PULP_4));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FruitVisualRepresentation.Raspberry:
|
case FruitVisualRepresentation.Raspberry:
|
||||||
Add(new Vector2(0, -0.34f), new Vector2(SMALL_PULP));
|
AddPulp(new Vector2(0, -0.34f), new Vector2(SMALL_PULP));
|
||||||
Add(PositionAt(0, DISTANCE_FROM_CENTRE_4), new Vector2(LARGE_PULP_4));
|
AddPulp(PositionAt(0, DISTANCE_FROM_CENTRE_4), new Vector2(LARGE_PULP_4));
|
||||||
Add(PositionAt(90, DISTANCE_FROM_CENTRE_4), new Vector2(LARGE_PULP_4));
|
AddPulp(PositionAt(90, DISTANCE_FROM_CENTRE_4), new Vector2(LARGE_PULP_4));
|
||||||
Add(PositionAt(180, DISTANCE_FROM_CENTRE_4), new Vector2(LARGE_PULP_4));
|
AddPulp(PositionAt(180, DISTANCE_FROM_CENTRE_4), new Vector2(LARGE_PULP_4));
|
||||||
Add(PositionAt(270, DISTANCE_FROM_CENTRE_4), new Vector2(LARGE_PULP_4));
|
AddPulp(PositionAt(270, DISTANCE_FROM_CENTRE_4), new Vector2(LARGE_PULP_4));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ namespace osu.Game.Rulesets.Catch.Skinning.Default
|
|||||||
|
|
||||||
protected const float SMALL_PULP = LARGE_PULP_3 / 2;
|
protected const float SMALL_PULP = LARGE_PULP_3 / 2;
|
||||||
|
|
||||||
private int numPulps;
|
private int pulpsInUse;
|
||||||
|
|
||||||
protected PulpFormation()
|
protected PulpFormation()
|
||||||
{
|
{
|
||||||
@ -35,21 +35,22 @@ namespace osu.Game.Rulesets.Catch.Skinning.Default
|
|||||||
|
|
||||||
protected void Clear()
|
protected void Clear()
|
||||||
{
|
{
|
||||||
for (; numPulps > 0; numPulps--)
|
for (int i = 0; i < pulpsInUse; i++)
|
||||||
InternalChildren[numPulps - 1].Alpha = 0;
|
InternalChildren[i].Alpha = 0;
|
||||||
|
pulpsInUse = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void Add(Vector2 position, Vector2 size)
|
protected void AddPulp(Vector2 position, Vector2 size)
|
||||||
{
|
{
|
||||||
if (numPulps == InternalChildren.Count)
|
if (pulpsInUse == InternalChildren.Count)
|
||||||
AddInternal(new Pulp { AccentColour = { BindTarget = AccentColour } });
|
AddInternal(new Pulp { AccentColour = { BindTarget = AccentColour } });
|
||||||
|
|
||||||
var pulp = InternalChildren[numPulps];
|
var pulp = InternalChildren[pulpsInUse];
|
||||||
pulp.Position = position;
|
pulp.Position = position;
|
||||||
pulp.Size = size;
|
pulp.Size = size;
|
||||||
pulp.Alpha = 1;
|
pulp.Alpha = 1;
|
||||||
|
|
||||||
numPulps++;
|
pulpsInUse++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user