4
0
Fork 0

room et timer

This commit is contained in:
sOlaris38 2020-12-06 14:02:23 +01:00
commit 9ffe1aa046
24 changed files with 271 additions and 22 deletions

View file

@ -1,10 +1,19 @@
/// @description Insérez la description ici
// Vous pouvez écrire votre code dans cet éditeur
// Tentative de tableau
for (i = 0; i < 4; i++)
{
for(j = 0; j < 4; j++)
{
tableau[i, j] = irandom(10);
}
}
global.difficulty = 1;
global.minutes = 1;
global.secondes = 20;
perdu = false;
// Tableau 3*3 ou 4*4
posX = irandom(3);
posY = irandom(3);

View file

@ -1,11 +1,13 @@
// draw_text(16,16,oPlayer.pv);
for (i = 0; i < 64; i+= 16)
for (i = 0; i < 4; i++)
{
for(j = 0; j < 64; j+= 16)
for(j = 0; j < 4; j++)
{
tableau[i, j] = 1;
draw_text(i,j,tableau[i, j]);
draw_text(i*16,j*16,tableau[i, j]);
}
}
if (!perdu) draw_text(160,16, string(global.minutes) + " : " + string(global.secondes));
else draw_text(160,16, "PERDU");

View file

@ -0,0 +1,8 @@
for (i = 0; i < 4; i++)
{
for(j = 0; j < 4; j++)
{
tableau[i, j] = irandom(10);
}
}

13
objects/oGame/Step_0.gml Normal file
View file

@ -0,0 +1,13 @@
// chrono
if (!perdu) {
global.secondes -= 1/room_speed;
if (global.secondes <= 0) {
global.minutes --;
global.secondes = 20;
}
if (global.minutes <= 0) {
perdu = true;
}
}

View file

@ -20,6 +20,8 @@
"eventList": [
{"isDnD":false,"eventNum":64,"eventType":8,"collisionObjectId":null,"parent":{"name":"oGame","path":"objects/oGame/oGame.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
{"isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,"parent":{"name":"oGame","path":"objects/oGame/oGame.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
{"isDnD":false,"eventNum":69,"eventType":9,"collisionObjectId":null,"parent":{"name":"oGame","path":"objects/oGame/oGame.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
{"isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,"parent":{"name":"oGame","path":"objects/oGame/oGame.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
],
"properties": [],
"overriddenProperties": [],