écran game over
This commit is contained in:
parent
f92fda29f9
commit
8134191c10
8 changed files with 53 additions and 33 deletions
scripts/Script1
|
@ -29,7 +29,10 @@ function knockBack(obj, objRepousse) {
|
|||
*/
|
||||
function hit(objAttaquant, objAttaque, degats) {
|
||||
objAttaque.pv -= degats;
|
||||
if (objAttaque.pv <= 0) instance_destroy(objAttaque);
|
||||
if (objAttaque.pv <= 0) {
|
||||
if (objAttaque.object_index = oPlayer) global.perdu = true;
|
||||
else instance_destroy(objAttaque);
|
||||
}
|
||||
else knockBack(objAttaquant, objAttaque);
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue