Snake
controls
wasd
code
https://github.com/katpavan/snake
Learned/Notes
- Created a Food Boundary game object that's invisible. I used it to grab its bounds and spawn food in random areas of the map but within those boundaries.
- The Snake's body is created by utilizing a snake segment prefab that I created. When OnTriggerEnter2D is invoked, I add to a _segments List and Instantiate a new snake segment prefab.
Leave a comment
Log in with itch.io to leave a comment.