4
0
Fork 0

Ajout du pushback et de la perte de hp quand on touche un monstre

This commit is contained in:
rick 2020-12-05 18:19:03 +01:00
parent 758f4e760a
commit c2f0c452ae
4 changed files with 20 additions and 1 deletions

View file

@ -0,0 +1,16 @@
if (pdv <= 0) {
instance_destroy();
show_debug_message("game overe");
// GAME OVER
} else {
pdv--;
if (other.x > x) {
x -= 10;
} else if (other.x < x) {
x += 10;
} else if (other.y > y) {
y -= 10;
} else if (other.y < y) {
y += 10;
}
}

View file

@ -0,0 +1,2 @@
/// @description Insérez la description ici
// Vous pouvez écrire votre code dans cet éditeur

View file

@ -1 +1,2 @@
seDeplace = 0;
seDeplace = 0;
pdv = 100;