1.以下是敌机的素材,希望通过代码实现敌机在舞台最上方随机出现,敌机的大小为10-12,位置为X:(-192至192),Y:180。向下移动,直到碰到最下方的舞台边缘时消失。要求在舞台上最多出现3架敌机,并且通过变量记录舞台上敌机出现数量。
1

参考答案

本周作业
1.以下是战机的素材,战机的大小为15,位置为X:8,Y:-138,希望通过代码可以实现战机在舞台上能够左右移动。

2. 以下是战机子弹的素材,希望通过代码实现以下事情:
(1)子弹在战机处出现,大小为40,子弹会向上移动,速度为8,到舞台最上方位置时消失,使用空格键控制子弹发射。
(2)限制子弹的数量,在游戏刚开始时战机有100发子弹,每发射一次,子弹数量-1。

参考答案
战机答案点击下方空白处

子弹答案(1)点击下方空白处

子弹答案(2)点击下方空白处

后记,小编朋友公司研发了一个游戏化的少儿编程在线课程(5-12岁),游戏化教学结合scratch(一款在线少儿编程工具,类似乐高的积木拼搭),我家娃娃学了几次课,非常喜欢(超预期),16次课才200多块钱,对锻炼孩子的思维能力和动手动力很有帮助。
声明:转载此文是出于传递更多信息之目的。若有来源标注错误或侵犯了您的合法权益,请作者持权属证明与本网联系,我们将及时更正、删除,谢谢。