I summarize the things I learn in a quick and concise way and share them to help others.
In this video, I cover the topic of 'How to Make a Unity | Fortune/Lucky Spinner Wheel.' The fortune/lucky spinner wheel mechanic is a popular feature found in many games and applications. By spinning the wheel with random intervals and speeds, and having the rewards determined purely by chance, users can experience excitement and satisfaction. As per my channel's concept, I explain this mechanic by presenting the most useful and concise method.
All my videos: • Unity 3D | C# Dersleri
Hyper Casual: • Playlist
Only Mechanics: • Playlist
Animation: • Playlist
The contents of this video and the operators or functions used are listed below:
1- Input.GetMouseButtonDown: Used to detect a mouse click event. The button to be detected can be specified.
2- bool: Used to hold the true or false value of a variable. Used to make decisions in expressions.
3- Rotate: Used to rotate an object. The rotation angle of the object can be specified using local or global coordinate systems.
4- IEnumerator: Used to make a code block run sequentially. These blocks can be interrupted with the yield return statement and then resumed.
5- Yield return new WaitForSeconds: An attribute used with IEnumerator. It is used to wait for a certain amount of time and interrupt IEnumerator.
6- while: Used to repeat a code block as long as a certain condition is true. The operation of this structure ends when the condition is false.
7- yield return null: An attribute used with IEnumerator. It is used to move on to the next step and interrupt IEnumerator.
8- Array: Used to store multiple data at the same time. These data can be accessed with an index number.
9- List: Used to store multiple data at the same time. Works similar to an array but the number of data can be dynamically changed.
10- Random.Range: Used to generate random numbers. Generates a random number within a certain range.
11- Length: Returns the number of elements in an array or list.
12- Mathf.Lerp: Used to move linearly between two numbers. This function calculates the movement by specifying the distance between the two given numbers and a ratio.
13- StartCoroutine: Used to run IEnumerator functions. This function starts and runs IEnumerator functions.
14- StopCoroutine: Used to stop IEnumerator functions. This function stops running IEnumerator functions.
15- Polygon Collider 2D: Used to determine the collision area of a 2D object. It is used to control the collision properties of an object.
16- if/else: Used to check if a condition is true or false. This structure is used to decide whether to execute a code block or not.
17- Switch case: Used to check multiple conditions and perform specific actions for each condition. The switch case structure checks the different values of a variable and performs specific actions for each value. This structure is similar to the if/else if structure but is more readable and understandable.
18- OnTriggerStay2D: An event that is constantly triggered when an object is in contact with another object. This attribute ensures that an object is constantly triggered along the boundary of a 2D area during its movement. This attribute is used especially for collision control in games.
#unity #unity3d #unitydersleri #unitytips #oyungeliştirme