diff --git a/objects/oPlayer/Collision_oMonster.gml b/objects/oPlayer/Collision_oMonster.gml new file mode 100644 index 0000000..43fafb0 --- /dev/null +++ b/objects/oPlayer/Collision_oMonster.gml @@ -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; + } +} \ No newline at end of file diff --git a/objects/oPlayer/Collision_oMonsterMelee.gml b/objects/oPlayer/Collision_oMonsterMelee.gml new file mode 100644 index 0000000..e69de29 diff --git a/objects/oPlayer/Collision_oWall.gml b/objects/oPlayer/Collision_oWall.gml new file mode 100644 index 0000000..5ae202d --- /dev/null +++ b/objects/oPlayer/Collision_oWall.gml @@ -0,0 +1,2 @@ +/// @description Insérez la description ici +// Vous pouvez écrire votre code dans cet éditeur diff --git a/objects/oPlayer/Create_0.gml b/objects/oPlayer/Create_0.gml index 748d11a..cf50ae9 100644 --- a/objects/oPlayer/Create_0.gml +++ b/objects/oPlayer/Create_0.gml @@ -1 +1,2 @@ -seDeplace = 0; \ No newline at end of file +seDeplace = 0; +pdv = 100; \ No newline at end of file