4
0
Fork 0
This repository has been archived on 2023-09-15. You can view files and clone it, but cannot push or open issues or pull requests.
surprise_dungeon/objects/oGame/Step_0.gml
2020-12-06 19:00:27 +01:00

49 lines
824 B
Text

// chrono
if (!global.perdu) {
global.secondes -= 1/room_speed;
if (global.secondes <= 0) {
global.minutes --;
global.secondes = 20;
if (global.minutes < 0) {
global.perdu = true;
}
}
}
// transition
if (global.transition != -1) {
switch(global.transition) {
case 0 :
if (posY = 0) posY = 3;
else posY --; break;
case 1 :
if (posX = 3) posX = 0;
else posX ++; break;
case 2 :
if (posY = 3) posY = 0;
else posY ++; break;
case 3 :
if (posX = 0) posX = 3;
else posX --; break;
}
global.spawn = global.transition;
global.transition = -1;
room_goto(asset_get_index("r" + string(tableau[posX, posY])));
}
// défaite
if (global.perdu) {
room_goto(rOver);
global.perdu = false;
}
// contact avec objet maudit
with (oPlayer) {
if place_meeting(x,y,oMaudit) {
}
}