To help me reach my goals I aimed to work on mini-projects outside of college for one of the mini-projects I wanted to work on a Jenga game to start making this game I made some prefabs to help to make the towers easier and to these prefabs, I added my block dragging script.
I next look for a good tutorial video on how to make draggable objects in unity I find one by Jayanam which I follow to get the dragging mechanic www.youtube.com/watch?v=0yHBDZHLRbQ. After I finish following the tutorial I spend some time trying to get a better understanding of the code and how it functions.
Next, I set up the level by adding the tower to a room and adding some safe zones on the ground where the players can place their pieces without the game restarting to add a failure state to the game I made it so if the blocks hit the red part of the ground then it would cause the game to restart.
For the restart script i added it so that when an object with the strTag touches the object with the script on it it would load the main menu scene using the on collision enter function.
To make the game feel more like a real game instead of going straight to the main menu I added in a lose menu so instead of the collision event triggering the main menu seen it simply loads up a canvas with a loss menu which has a link to restart or the main menu page.