Make a small game, use the keyboard arrow keys to control the movement of the ball, use the cube to enclose an area to prevent the ball from falling, control the ball to eat the small cubes, and eat one to score one point.
This is how the final game looks like.
This is what it looks like after running the game.
First add a ground, create a game ground in the "Hierarchy" window, right click and select "3DObject" - "Plane". (Remember to reset the coordinates of the ground)
Material
If you want to modify the ground color, you need to add a material to it. Create a new folder named Materials in the "Project" window to store materials, and create a new "Material" material file in the Materials folder. as the picture shows
Drag the newly created material ball to the Ground in the "Hierarchy" window, and modify the color you like in the "Inspector" window.
Create Player
Create a Sphere, adjust an appropriate coordinate, and add a shader to it.
Rigidbody rigid body component
Add gravity to the ball. Select the ball Player object in the "Hierarchy" window, click the "Add component" button on the smallest surface in the "Inspector" window, and add the "Rigidbody" rigid body component.
Add c# script file
To make the ball move, add a script file to the ball object.
Create a new folder Scripts in the "Project" window to store script files. Select the ball Player object in the "Hierarchy" window, click the "Add component" button at the bottom of the "Inspector" window, select "New Script", enter Player, and click "Creat and Add" to create a script file.