Ajout invisibilité
This commit is contained in:
parent
185f274df4
commit
86db94616f
5 changed files with 24 additions and 11 deletions
|
@ -2,15 +2,18 @@ if (pdv <= 0) {
|
||||||
instance_destroy();
|
instance_destroy();
|
||||||
show_debug_message("game overe");
|
show_debug_message("game overe");
|
||||||
// GAME OVER
|
// GAME OVER
|
||||||
} else {
|
} else if (inv == 0) {
|
||||||
pdv--;
|
pdv--;
|
||||||
if (other.x > x) {
|
inv = 120;
|
||||||
x -= 10;
|
}
|
||||||
} else if (other.x < x) {
|
|
||||||
x += 10;
|
// pushback
|
||||||
} else if (other.y > y) {
|
if (other.x > x) {
|
||||||
y -= 10;
|
x -= 10;
|
||||||
} else if (other.y < y) {
|
} else if (other.x < x) {
|
||||||
y += 10;
|
x += 10;
|
||||||
}
|
} else if (other.y > y) {
|
||||||
|
y -= 10;
|
||||||
|
} else if (other.y < y) {
|
||||||
|
y += 10;
|
||||||
}
|
}
|
|
@ -1,2 +1,3 @@
|
||||||
seDeplace = 0;
|
seDeplace = 0;
|
||||||
pdv = 100;
|
pdv = 100;
|
||||||
|
inv = 0; //timer invinsiblité
|
7
objects/oPlayer/Draw_0.gml
Normal file
7
objects/oPlayer/Draw_0.gml
Normal 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);
|
||||||
|
}
|
|
@ -33,6 +33,7 @@
|
||||||
show_debug_message("pas d'objet...");
|
show_debug_message("pas d'objet...");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (inst != noone && !ds_list_empty(inst)) {
|
if (inst != noone && !ds_list_empty(inst)) {
|
||||||
show_debug_message("objet trouvé !");
|
show_debug_message("objet trouvé !");
|
||||||
|
|
|
@ -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":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":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":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": [
|
"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",},
|
{"varType":1,"value":"0","rangeEnabled":false,"rangeMin":0.0,"rangeMax":10.0,"listItems":[],"multiselect":false,"filters":[],"resourceVersion":"1.0","name":"deplaceHorizontal","tags":[],"resourceType":"GMObjectProperty",},
|
||||||
|
|
Reference in a new issue