update SwipeArrow.cs
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user