It's been too long since I did anything on here. I guess I can call it a vacation, haha.
Anyway, I was able to add a snake enemy to level 2, which brings the count up to 4. It has a different collision detection than the player so it can detect if it is not over a block so it can turn around.
I also changed the created blocks to be their own entities instead of with the regular blocks. This now allows me to "destroy" the blocks when an enemy (snake) collides with one.
This exercise has also reminded me the value of creating objects with null. I was able to handle whether a snake was created or not using this handy little value.
No comments:
Post a Comment