Componenti
Componente | Proprietà | Valore | |
---|---|---|---|
Screen | Screen1 | Title | Mole Mash 1 |
Drawing and Animation > Canvas | Canvas1 | Height | 300 |
Width | Fill parent | ||
Drawing and Animation > ImageSprite | is_Mole | Picture | mole.png |
User Interface > Button | bu_Reset | Text | Reset |
Layout > HorizontalArrangement | ha_Hits | ||
Layout > Label | la_Hits | Text | Hits: |
Layout > Label | la_HitsCount | Text | 0 |
Layout > HorizontalArrangement | ha_Misses | ||
Layout > Label | la_Misses | Text | Misses: |
Layout > Label | la_MissesCount | Text | 0 |
Media > Clock | Clock1 | On, On, 1000 | |
Media > Sound | Sound1 |
Blocchi
La talpa occupa una posizione casuale
… appena parte l’applicazione
… e ogni secondo
Ogni volta che si tocca lo schermo (Canvas) ed è stato toccato uno sprite (c’è solo quello della talpa…) si incrementa il contatore di successi, altrimenti quello dei fallimenti
Per ricominciare il gioco basta reimpostare i contatori a zero
Per rendere il gioco più interattivo si aggiunge la vibrazione
Il gioco è più realistico con 5 buche in posizioni fisse e la talpa che si sposta da una buca all’altra
Componenti
Componente | Proprietà | Valore | |
---|---|---|---|
Screen | Screen1 | AlignHorizontal | Center |
Title | Mole Mash 2 | ||
Drawing and Animation > Canvas | Canvas1 | Height | 300 |
Width | 300 | ||
Drawing and Animation > ImageSprite | is_Hole1 | ||
Drawing and Animation > ImageSprite | is_Hole2 | ||
Drawing and Animation > ImageSprite | is_Hole3 | ||
Drawing and Animation > ImageSprite | is_Hole4 | ||
Drawing and Animation > ImageSprite | is_Hole5 | ||
Drawing and Animation > ImageSprite | is_Hole6 | ||
Drawing and Animation > ImageSprite | is_Mole | Picture | mole.png |
Layout > HorizontalArrangement > ha_Score | |||
Layout > Label | la_Score | Text | Score: |
Layout > Label | la_ScoreValue | Text | 0 |
Media > Clock | Clock1 | On, On, 1000 | |
Media > Sound | Sound1 |
Blocchi
Le 5 buche sono inserite in una lista e condividono la stessa immagine
Ogni secondo la talpa cambia buca
La talpa occupa una buca scelta a caso dalla lista
Quando si colpisce la talpa: incremento del punteggio, vibrazione, nuova posizione
Vedi
- http://appinventor.mit.edu/explore/ai2/molemash
- http://www.appinventor.org/content/videosAI1/beginning/moleMash
- http://www.appinventor.org/apps/molemash/molemash.pdf
- http://appinventor.mit.edu/explore/ai2/molemash-2
???
- tasto Reset
- contatore dei colpi a vuoto
- suoni
- …