a game about throwing hammers made for the github game off
Diffstat (limited to 'autoloads/Utils.gd')
-rw-r--r--autoloads/Utils.gd3
1 files changed, 3 insertions, 0 deletions
diff --git a/autoloads/Utils.gd b/autoloads/Utils.gd
index b794b72..a005032 100644
--- a/autoloads/Utils.gd
+++ b/autoloads/Utils.gd
@@ -17,3 +17,6 @@ static func str_vec(vec: Vector2) -> String:
static func sub(a: Array, b: Array) -> Array:
return a.filter(func(item) -> bool: return not item in b)
+
+static func out_of_bounds(v: Vector2i, rect: Vector2i) -> bool:
+ return v.x > rect.x or v.y > rect.y or v.x < 0 or v.y < 0 \ No newline at end of file