Example of creating a simple game
The idea was taken from twitter post
There may be bugs in the project
You can use the code as a reference for your own projects
Enjoy
https://twitter.com/px_dave/status/1662422413697601538?s=20
Gameplay video: https://youtube.com/shorts/8DBcJy7H32s
Unity 2021.3.23f1