Currently, enemies spawn on a random x position in the grid on the top layer. This x position can be inside a brick.
This shouldn't be possible.
When spawning an enemy, check if the enemy collides with a brick. If it does, give it a new x value, and check again. Do this until it doesn't collide anymore. (Use a loop for this)
Currently, enemies spawn on a random x position in the grid on the top layer. This x position can be inside a brick. This shouldn't be possible.
When spawning an enemy, check if the enemy collides with a brick. If it does, give it a new x value, and check again. Do this until it doesn't collide anymore. (Use a loop for this)