diff options
Diffstat (limited to 'Robofactor/Boite.pde')
-rw-r--r-- | Robofactor/Boite.pde | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Robofactor/Boite.pde b/Robofactor/Boite.pde new file mode 100644 index 0000000..c6fcfaa --- /dev/null +++ b/Robofactor/Boite.pde @@ -0,0 +1,23 @@ +public class Boite extends Entite{ + + //variables + + //fct + Boite(int startRangee, int xDepart, int startVitesse){ + rangee = startRangee; + x = xDepart; + xBloc = xDepart; + vitesse = startVitesse; + } + + void afficher(){ + image (avatar, x,(100+200*rangee)-(avatar.height/2)); + } + + void collision(Heros heros, Score score) { + if (this.getx()-85 <= heros.getx() && this.getx()+avatar.width>=heros.getx() && this.getRangee() == heros.getRangee()){ + x = -200; + score.augmenter(10); + } + } +}
|