update SwipeArrow.cs

This commit is contained in:
msk
2023-10-09 18:03:30 -07:00
parent e5a616cd1c
commit 8e5f5d8daa
+14 -3
View File
@@ -25,11 +25,22 @@ namespace WacK.Things.TunnelObjects
public void SetPosSize(int pos, int size)
{
var p = Position;
p.X = Constants.BASE_2D_RESOLUTION / 60 * pos + Constants.BASE_2D_RESOLUTION / 120;
Position = p;
var s = Size;
if (size <= 59)
{
p.X = Constants.BASE_2D_RESOLUTION / 60 * pos + Constants.BASE_2D_RESOLUTION / 120;
s.Y = Constants.BASE_2D_RESOLUTION / 60 * size - Constants.BASE_2D_RESOLUTION / 60;
}
else
{
p.X = Constants.BASE_2D_RESOLUTION / 60 * pos;
s.Y = Constants.BASE_2D_RESOLUTION;
}
Position = p;
Size = s;
shader.SetShaderParameter("TileMult", s.Y / 64);
}