Ask coding questions

← Back to all posts
Why won't my collision detection function work inside a class?

I have a collision detection function that works perfectly, but only if I put it in my game loop (lines 30 to 34). If I put it in a class as an attribute and then call it from within the game loop, it doesn't work (lines 16 to 20). What could be doing this?