3.1 编程思路 #
![](https://dashima.net/wp-content/uploads/2021/06/image-52-1024x512.png)
3.2 编程步骤 #
(1)绘制角色”端午的来源“
![](https://dashima.net/wp-content/uploads/2021/06/image-53.png)
设置初始化,清除特效、大小、位置。
让角色向上移动并逐渐变小,最后在舞台顶端停止。并发出开始消息。
![](https://dashima.net/wp-content/uploads/2021/06/image-54.png)
(2)背景
导入所有背景图后,按顺序将背景图进行调整。
初始背景为纯色背景,收到开始消息后,循环切换背景直到全部切换完成,广播”屈原消息“
![](https://dashima.net/wp-content/uploads/2021/06/image-55.png)
(3)赛龙舟
初始化大小、位置、隐藏;
收到开始消息后显示、循环切换造型。
GIF图片导入后,可以查看到所有该图片的造型。
![](https://dashima.net/wp-content/uploads/2021/06/image-56.png)
(4)屈原
当收到背景发出的”屈原“消息后显示,并循环切换造型;
按下空格键后广播”祝福“,并隐藏,停止该角色的其他脚本。
![](https://dashima.net/wp-content/uploads/2021/06/image-57.png)
4.问答与练习 #
4.1小鹏问老师,端午节的由来到达顶部后,角色渐渐消失是怎么做到的呢?
![](https://dashima.net/wp-content/uploads/2021/06/image-58.png)
4.2 课后练习
完成端午安康的程序,按下空格键后向右滑动并展示动态效果。
![](https://dashima.net/wp-content/uploads/2021/06/image-59.png)