碰到边缘就反弹
-
预备知识
”碰到边缘就反弹”编程积木
只要角色触碰到舞台边缘,这个编程积木就会改变角色的方向。
https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/55342371-edda-448f-984c-43bafed6da08.png" width="250" style="filter: drop-shadow(0.35rem 0.35rem 0.4rem rgba(0, 0, 0, 0.5));">
向右移动,向左反弹
假设一个球体角色正在向右边移动。
https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/629467cc-aa04-4285-85fb-3413e2a0e1dc.gif" width="900" style="border-radius: 5px; border: 1px solid #29622d;">
移动方向
如果我们改变角色的方向,角色将会朝着新方向移动。
https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/bde351a1-64a5-49dd-a782-03154790dae2.gif" width="900" style="border-radius: 5px; border: 1px solid #29622d;">
角色被用户窗口困住
角色是不能走出用户窗口的。一旦靠近窗口边缘,角色将会留下一个“小尾巴”,以便我们可以抓住它。
https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/cdb2a7be-0d75-4389-968e-364d156e1ed0.gif" width="600" style="">
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login