赛派号

男手表哪个牌子质量好又便宜 Making an Image move in the app clicker game

Big picture: the topic of animation is a source of confusion both in App Lab AND generally.

Generally speaking you can’t use loops to create animation effects in App Lab - this has to do with the event-driven paradigm of App Lab. If you’re running a loop, that takes over the machine and it can’t do other things in parallel, like listen for events. The source of confusion is of our own making – when you use loops with the Turtle it does cause an animation-like effect. That’s because we did behind the scenes magic to make it seem like you’re using a loop to cause animation. We did that with the thinking that it’s a natural way for students to think about iterative behior and we wanted to reduce barriers to using loops in the first place - otherwise it’s hard to justify using a loop in an event-driven environment for things besides data processing.

Thus, to make animation work in an event-driven paradigm you he to…use events! That’s what the timedLoop command is for. What timedLoop does is fire an event at a given interval of time. So rather than a continuous loop that takes over the machine, you get to process the code in the event-handling function at every interval.

Hope that makes some kind of big-picture sense.

Baker CSP Team

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至lsinopec@gmail.com举报,一经查实,本站将立刻删除。

上一篇 没有了

下一篇没有了