4
0
Fork 0

Ajout invisibilité

This commit is contained in:
rick 2020-12-05 18:56:12 +01:00
parent 185f274df4
commit 86db94616f
5 changed files with 24 additions and 11 deletions

View file

@ -2,15 +2,18 @@ if (pdv <= 0) {
instance_destroy();
show_debug_message("game overe");
// GAME OVER
} else {
} else if (inv == 0) {
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;
}
inv = 120;
}
// pushback
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

@ -1,2 +1,3 @@
seDeplace = 0;
pdv = 100;
pdv = 100;
inv = 0; //timer invinsiblité

View file

@ -0,0 +1,7 @@
// Suppression de l'invinsibilité
if (inv > 0) {
inv--;
draw_sprite_ext(sprite_index, image_index, x, y, image_xscale, image_yscale, image_angle, c_lime, image_alpha);
} else {
draw_sprite_ext(sprite_index, image_index, x, y, image_xscale, image_yscale, image_angle, image_blend, image_alpha);
}

View file

@ -33,6 +33,7 @@
show_debug_message("pas d'objet...");
}
/*
if (inst != noone && !ds_list_empty(inst)) {
show_debug_message("objet trouvé !");

View file

@ -25,6 +25,7 @@
{"isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,"parent":{"name":"oPlayer","path":"objects/oPlayer/oPlayer.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
{"isDnD":false,"eventNum":74,"eventType":9,"collisionObjectId":null,"parent":{"name":"oPlayer","path":"objects/oPlayer/oPlayer.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
{"isDnD":false,"eventNum":0,"eventType":4,"collisionObjectId":{"name":"oMonster","path":"objects/oMonster/oMonster.yy",},"parent":{"name":"oPlayer","path":"objects/oPlayer/oPlayer.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
{"isDnD":false,"eventNum":0,"eventType":8,"collisionObjectId":null,"parent":{"name":"oPlayer","path":"objects/oPlayer/oPlayer.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
],
"properties": [
{"varType":1,"value":"0","rangeEnabled":false,"rangeMin":0.0,"rangeMax":10.0,"listItems":[],"multiselect":false,"filters":[],"resourceVersion":"1.0","name":"deplaceHorizontal","tags":[],"resourceType":"GMObjectProperty",},