room et timer
This commit is contained in:
parent
9f203efdb7
commit
9ffe1aa046
24 changed files with 271 additions and 22 deletions
|
@ -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);
|
|
@ -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");
|
8
objects/oGame/KeyPress_69.gml
Normal file
8
objects/oGame/KeyPress_69.gml
Normal 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
13
objects/oGame/Step_0.gml
Normal 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;
|
||||
}
|
||||
}
|
|
@ -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": [],
|
||||
|
|
Reference in a new issue