Scratch少儿编程第十三讲 出发吧小船

网友投稿 2020-01-06 11:00

出发吧小船

1、编辑角色和小船破碎的造型

https://cdn.china-scratch.com/timg/200108/10595QW1-0.jpghttps://cdn.china-scratch.com/timg/200108/1059594543-1.jpghttps://cdn.china-scratch.com/timg/200108/105959D04-2.jpghttps://cdn.china-scratch.com/timg/200108/1059594543-1.jpghttps://cdn.china-scratch.com/timg/200108/1059594543-1.jpghttps://cdn.china-scratch.com/timg/200108/1100004158-5.jpghttps://cdn.china-scratch.com/timg/200108/1100001911-6.jpg

2、绘制障碍

https://cdn.china-scratch.com/timg/200108/1100014U4-7.jpghttps://cdn.china-scratch.com/timg/200108/1059594543-1.jpghttps://cdn.china-scratch.com/timg/200108/11000160E-9.jpghttps://cdn.china-scratch.com/timg/200108/1059594543-1.jpghttps://cdn.china-scratch.com/timg/200108/1100001911-6.jpg

3、编辑小船

https://cdn.china-scratch.com/timg/200108/1100024S4-12.jpg

    小船的程序实现的效果就是是跟随鼠标移动,用到了面向、移到鼠标指针、移到舞台左下角(初始位置)。

https://cdn.china-scratch.com/timg/200108/1059594543-1.jpghttps://cdn.china-scratch.com/timg/200108/1100025627-14.jpg

     这里新加入了一个条件判断,小船角色与鼠标的距离大于5时,面向鼠标移动1步。

https://cdn.china-scratch.com/timg/200108/1059594543-1.jpghttps://cdn.china-scratch.com/timg/200108/1100036001-16.jpg

     这里加入了小船到达终点的程序,大家看一下就行啦!

https://cdn.china-scratch.com/timg/200108/1059594543-1.jpghttps://cdn.china-scratch.com/timg/200108/11000A442-18.jpg

    如果小船碰到障碍(障碍的颜色用取色笔取一下),那么小船损坏,换成第二个造型。

https://cdn.china-scratch.com/timg/200108/1059594543-1.jpghttps://cdn.china-scratch.com/timg/200108/11000J5T-20.jpg

     这个是在右侧可以旋转的障碍的程序,这里需要注意的是调整障碍的中心点,并且用时间变量计时,看多长时间可以到达终点哟!

声明:本文章由网友投稿作为教育分享用途,如有侵权原作者可通过邮件及时和我们联系删除:freemanzk@qq.com