diff options
| author | Elizabeth Hunt <elizabeth@simponic.xyz> | 2026-04-22 20:29:50 -0700 |
|---|---|---|
| committer | Elizabeth Hunt <elizabeth@simponic.xyz> | 2026-04-22 20:29:50 -0700 |
| commit | 24b0469237285a05d9ffc05d18e43cc5dcdef00f (patch) | |
| tree | 1c6924614b7d030c467919380d6c398d62efb602 /collisions.lua | |
| parent | 078eca583eec21d317e931c84db8f084bef4305d (diff) | |
| download | dyl8-24b0469237285a05d9ffc05d18e43cc5dcdef00f.tar.gz dyl8-24b0469237285a05d9ffc05d18e43cc5dcdef00f.zip | |
Stuff
Diffstat (limited to 'collisions.lua')
| -rw-r--r-- | collisions.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/collisions.lua b/collisions.lua index fb7aca7..feb138b 100644 --- a/collisions.lua +++ b/collisions.lua @@ -1,8 +1,8 @@ sw, sh = 8, 8 function is_colliding(a, b) - ax1, bx1 = a.pos.x, b.pos.x + ax1, bx1 = a.position.x, b.position.x ax2, bx2 = ax1 + sw, bx1 + sw - ay1, by1 = a.pos.y, b.pos.y + ay1, by1 = a.position.y, b.position.y ay2, by2 = ay1 + sh, by1 + sh return (ax1 < bx2 and ax2 > bx1 and ay1 < by2 and ay2 > by1) @@ -27,4 +27,4 @@ function run_collisions() ::continue:: end end -end
\ No newline at end of file +end |
