Cleaned up stuff ig
This commit is contained in:
@@ -23,18 +23,10 @@ namespace InterfaceOff
|
||||
{
|
||||
Rect rect = Instance.GameCanvas.pixelRect;
|
||||
|
||||
float x = Random.Range(rect.xMin, rect.xMax);
|
||||
float y = Random.Range(rect.yMin, rect.yMax);
|
||||
float x = Random.Range(rect.xMin + 150, rect.xMax - 150);
|
||||
float y = Random.Range(rect.yMin + 150, rect.yMax - 150);
|
||||
|
||||
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