Added basic bouncing
This commit is contained in:
@@ -28,5 +28,13 @@ namespace InterfaceOff
|
||||
|
||||
return new Vector3(x, y, 0f);
|
||||
}
|
||||
|
||||
public static bool IsRectWithinCanvas(Rect rect)
|
||||
{
|
||||
Rect b = Instance.GameCanvas.pixelRect;
|
||||
Rect a = rect;
|
||||
|
||||
return b.xMin <= a.xMin && b.yMin <= a.yMin && b.xMax >= a.xMax && b.yMax >= a.yMax;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user