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







2、绘制障碍





3、编辑小船

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


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


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


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


这个是在右侧可以旋转的障碍的程序,这里需要注意的是调整障碍的中心点,并且用时间变量计时,看多长时间可以到达终点哟!
声明:转载此文是出于传递更多信息之目的。若有来源标注错误或侵犯了您的合法权益,请作者持权属证明与本网联系,我们将及时更正、删除,谢谢。
标签