1、整体预览

AppInventor学习笔记(四)——打地鼠应用学习

 

2、图片精灵的添加

(1)首先加入一个画布进去

AppInventor学习笔记(四)——打地鼠应用学习

      调节属性如图

AppInventor学习笔记(四)——打地鼠应用学习

(2)添加精灵

AppInventor学习笔记(四)——打地鼠应用学习

      添加精灵,然后上传张图片进行属性修改

 

3、加入Clock

AppInventor学习笔记(四)——打地鼠应用学习

       直接加入,设定为1000ms

 

二、Block编程

1、Block函数建立

(1)首先选择这个模块,将procedure改为MoveMole

AppInventor学习笔记(四)——打地鼠应用学习AppInventor学习笔记(四)——打地鼠应用学习

      再加入右边的模块,组成图如下

AppInventor学习笔记(四)——打地鼠应用学习

      其中随机数的模块在Math中查找。

      重点在对于安卓App的绘图坐标的掌握

A、原点在左上角,横坐标正方向为水平向右,纵坐标正方向为垂直向下

B、锚点也在左上角。

(2)在程序中不断调用这个函数

AppInventor学习笔记(四)——打地鼠应用学习

      分别在screen和clock中查找这两个方法,然后在produrce中找到我们建立的方法即可。

AppInventor学习笔记(四)——打地鼠应用学习

 

2、建立打地鼠逻辑

AppInventor学习笔记(四)——打地鼠应用学习

      不难,可以试试哦。

 

3、剩下按钮的设置

AppInventor学习笔记(四)——打地鼠应用学习

      上面是重置按钮的设计。

      下面是震动提醒。

 

三、成果展示

AppInventor学习笔记(四)——打地鼠应用学习

相关文章:

  • 2021-12-25
  • 2021-09-01
  • 2021-08-30
  • 2022-12-23
  • 2022-02-01
  • 2022-12-23
  • 2021-12-26
猜你喜欢
  • 2022-02-25
  • 2021-12-28
  • 2022-02-24
  • 2021-10-15
  • 2021-08-04
  • 2021-05-12
  • 2021-05-06
相关资源
相似解决方案