Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • CreatiCode
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

CreatiCode Scratch Forum

  1. CreatiCode Forum
  2. 知识库
  3. 二维积木
  4. 碰到边缘就反弹

碰到边缘就反弹

Scheduled Pinned Locked Moved 二维积木
1 Posts 1 Posters 965 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • CreatiCodeI Offline
    CreatiCodeI Offline
    CreatiCode
    wrote on last edited by admin
    #1

     

    预备知识

    • 移动()步
    • 重复执行

     

    ”碰到边缘就反弹”编程积木

    只要角色触碰到舞台边缘,这个编程积木就会改变角色的方向。

    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="">

    1 Reply Last reply
    0

    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
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • CreatiCode