Added basic bouncing

This commit is contained in:
Pasha Bibko
2026-01-13 12:19:07 +00:00
parent e235c9e440
commit c15d917245
6 changed files with 63 additions and 13 deletions

View File

@@ -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;
}
}
}