The same thing can be done in Unity with the following script:
Below is a more detailed comparison between move related command in Scatch and the command in Unity.
Go To Certain Position
In Scratch:
In Unity:
It means go to position X=0.1 and Y=0.2
Note the writing of decimal number in Unity. The number 0.1 needs to be written as 0.1f and the number 0.2 needs to be written as 0.2f.
For integer number such as 0 there is no need to put f symbol afterwards.
Note the writing of decimal number in Unity. The number 0.1 needs to be written as 0.1f and the number 0.2 needs to be written as 0.2f.
For integer number such as 0 there is no need to put f symbol afterwards.
It means change the X position by 0.1 point.
Note that in Unity the 0.1 number is chosen instead of 10 because if the number 10 is chosen the Sprite movement will be way too fast and the Sprite will disappear from the screen very quickly.
Note that in Unity the 0.1 number is chosen instead of 10 because if the number 10 is chosen the Sprite movement will be way too fast and the Sprite will disappear from the screen very quickly.
Tidak ada komentar:
Posting Komentar