craftyjs/Crafty

How can I check if an entity is out of bounds?

Opened this issue · 1 comments

I want to check if an entity is 'out of bounds.' I have tried checking if the entity's x is greater than window.availWidth and making the entity's x decrease by 2 but that doesn't work.

I'm not very good at explaining stuff so if you're having trouble my code is here https://repl.it/@j0rdancodes/Game-4

what event did you bind that code to?