rWin
This commit is contained in:
parent
e4665c4d1a
commit
ef3cd366ac
8 changed files with 142 additions and 11 deletions
|
@ -19,6 +19,7 @@
|
|||
{"id":{"name":"sPlayerRun","path":"sprites/sPlayerRun/sPlayerRun.yy",},"order":1,},
|
||||
{"id":{"name":"oMonsterMelee","path":"objects/oMonsterMelee/oMonsterMelee.yy",},"order":2,},
|
||||
{"id":{"name":"sStone","path":"sprites/sStone/sStone.yy",},"order":5,},
|
||||
{"id":{"name":"rWin","path":"rooms/rWin/rWin.yy",},"order":15,},
|
||||
{"id":{"name":"oMaudit","path":"objects/oMaudit/oMaudit.yy",},"order":1,},
|
||||
{"id":{"name":"oOver","path":"objects/oOver/oOver.yy",},"order":4,},
|
||||
{"id":{"name":"r4","path":"rooms/r4/r4.yy",},"order":5,},
|
||||
|
@ -72,6 +73,7 @@
|
|||
{"roomId":{"name":"r10","path":"rooms/r10/r10.yy",},},
|
||||
{"roomId":{"name":"rOver","path":"rooms/rOver/rOver.yy",},},
|
||||
{"roomId":{"name":"r11","path":"rooms/r11/r11.yy",},},
|
||||
{"roomId":{"name":"rWin","path":"rooms/rWin/rWin.yy",},},
|
||||
],
|
||||
"Folders": [
|
||||
{"folderPath":"folders/Sprites.yy","order":0,"resourceVersion":"1.0","name":"Sprites","tags":[],"resourceType":"GMFolder",},
|
||||
|
|
|
@ -3,14 +3,6 @@
|
|||
|
||||
randomize();
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
for(j = 0; j < 4; j++)
|
||||
{
|
||||
tableau[i, j] = irandom(10);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
global.difficulty = 1;
|
||||
global.minutes = 2;
|
||||
|
@ -22,6 +14,15 @@ global.spawn = -1;
|
|||
global.perdu = false;
|
||||
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
for(j = 0; j < 4; j++)
|
||||
{
|
||||
tableau[i, j] = irandom(10);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
posXfin = irandom(3);
|
||||
posYfin = irandom(3);
|
||||
tableau[posXfin, posYfin] = 11;
|
||||
|
@ -36,3 +37,5 @@ while(posXfin = posX and posYfin = posY) {
|
|||
|
||||
room_goto(asset_get_index("r" + string(tableau[posX, posY])));
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
if (room != rOver) {
|
||||
if (room != rOver and room != rWin) {
|
||||
draw_rectangle_color(1280,0,display_get_gui_width(),96,c_black,c_black,c_black,c_black,false);
|
||||
draw_text(1312,72,"map");
|
||||
draw_rectangle_color(0,0,display_get_gui_width() - 1280,96,c_black,c_black,c_black,c_black,false);
|
||||
|
@ -35,8 +35,13 @@ if (room != rOver) {
|
|||
draw_text(800,16,room_get_name(room));
|
||||
}
|
||||
|
||||
else {
|
||||
else if (room = rOver) {
|
||||
draw_text_transformed(room_width / 2, room_height / 2, "GAME OVER!", 2, 2, image_angle);
|
||||
draw_text_transformed(room_width / 2, room_height / 2 + 128, "PRESS R TO RESTART", 2, 2, image_angle);
|
||||
}
|
||||
|
||||
else {
|
||||
draw_text_transformed(room_width / 2, room_height / 2, "VICTORY!", 2, 2, image_angle);
|
||||
draw_text_transformed(room_width / 2, room_height / 2 + 128, "PRESS R TO RESTART", 2, 2, image_angle);
|
||||
}
|
||||
|
||||
|
|
|
@ -39,3 +39,11 @@ if (global.perdu) {
|
|||
room_goto(rOver);
|
||||
global.perdu = false;
|
||||
}
|
||||
|
||||
// contact avec objet maudit
|
||||
|
||||
with (oPlayer) {
|
||||
if place_meeting(x,y,oMaudit) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
1
objects/oMaudit/Collision_oPlayer.gml
Normal file
1
objects/oMaudit/Collision_oPlayer.gml
Normal file
|
@ -0,0 +1 @@
|
|||
global.difficulty ++;
|
56
rooms/rWin/rOver.yy
Normal file
56
rooms/rWin/rOver.yy
Normal file
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
"isDnd": false,
|
||||
"volume": 1.0,
|
||||
"parentRoom": null,
|
||||
"views": [
|
||||
{"inherit":false,"visible":true,"xview":0,"yview":0,"wview":432,"hview":240,"xport":0,"yport":0,"wport":1366,"hport":768,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,},
|
||||
{"inherit":false,"visible":false,"xview":0,"yview":0,"wview":1366,"hview":768,"xport":0,"yport":0,"wport":1366,"hport":768,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,},
|
||||
{"inherit":false,"visible":false,"xview":0,"yview":0,"wview":1366,"hview":768,"xport":0,"yport":0,"wport":1366,"hport":768,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,},
|
||||
{"inherit":false,"visible":false,"xview":0,"yview":0,"wview":1366,"hview":768,"xport":0,"yport":0,"wport":1366,"hport":768,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,},
|
||||
{"inherit":false,"visible":false,"xview":0,"yview":0,"wview":1366,"hview":768,"xport":0,"yport":0,"wport":1366,"hport":768,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,},
|
||||
{"inherit":false,"visible":false,"xview":0,"yview":0,"wview":1366,"hview":768,"xport":0,"yport":0,"wport":1366,"hport":768,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,},
|
||||
{"inherit":false,"visible":false,"xview":0,"yview":0,"wview":1366,"hview":768,"xport":0,"yport":0,"wport":1366,"hport":768,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,},
|
||||
{"inherit":false,"visible":false,"xview":0,"yview":0,"wview":1366,"hview":768,"xport":0,"yport":0,"wport":1366,"hport":768,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,},
|
||||
],
|
||||
"layers": [
|
||||
{"instances":[
|
||||
{"properties":[],"isDnd":false,"objectId":{"name":"oOver","path":"objects/oOver/oOver.yy",},"inheritCode":false,"hasCreationCode":false,"colour":4294967295,"rotation":0.0,"scaleX":1.0,"scaleY":1.0,"imageIndex":0,"imageSpeed":1.0,"inheritedItemId":null,"frozen":false,"ignore":false,"inheritItemSettings":false,"x":208.0,"y":80.0,"resourceVersion":"1.0","name":"inst_39EB715D","tags":[],"resourceType":"GMRInstance",},
|
||||
],"visible":true,"depth":0,"userdefinedDepth":false,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":16,"gridY":16,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Instances","tags":[],"resourceType":"GMRInstanceLayer",},
|
||||
{"spriteId":null,"colour":4289967027,"x":0,"y":0,"htiled":false,"vtiled":false,"hspeed":0.0,"vspeed":0.0,"stretch":false,"animationFPS":15.0,"animationSpeedType":0,"userdefinedAnimFPS":false,"visible":true,"depth":100,"userdefinedDepth":false,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Background","tags":[],"resourceType":"GMRBackgroundLayer",},
|
||||
],
|
||||
"inheritLayers": false,
|
||||
"creationCodeFile": "",
|
||||
"inheritCode": false,
|
||||
"instanceCreationOrder": [
|
||||
{"name":"inst_39EB715D","path":"rooms/rOver/rOver.yy",},
|
||||
],
|
||||
"inheritCreationOrder": false,
|
||||
"sequenceId": null,
|
||||
"roomSettings": {
|
||||
"inheritRoomSettings": false,
|
||||
"Width": 432,
|
||||
"Height": 240,
|
||||
"persistent": false,
|
||||
},
|
||||
"viewSettings": {
|
||||
"inheritViewSettings": false,
|
||||
"enableViews": true,
|
||||
"clearViewBackground": false,
|
||||
"clearDisplayBuffer": true,
|
||||
},
|
||||
"physicsSettings": {
|
||||
"inheritPhysicsSettings": false,
|
||||
"PhysicsWorld": false,
|
||||
"PhysicsWorldGravityX": 0.0,
|
||||
"PhysicsWorldGravityY": 10.0,
|
||||
"PhysicsWorldPixToMetres": 0.1,
|
||||
},
|
||||
"parent": {
|
||||
"name": "rooms",
|
||||
"path": "folders/Rooms/rooms.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "rOver",
|
||||
"tags": [],
|
||||
"resourceType": "GMRoom",
|
||||
}
|
56
rooms/rWin/rWin.yy
Normal file
56
rooms/rWin/rWin.yy
Normal file
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
"isDnd": false,
|
||||
"volume": 1.0,
|
||||
"parentRoom": null,
|
||||
"views": [
|
||||
{"inherit":false,"visible":true,"xview":0,"yview":0,"wview":432,"hview":240,"xport":0,"yport":0,"wport":1366,"hport":768,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,},
|
||||
{"inherit":false,"visible":false,"xview":0,"yview":0,"wview":1366,"hview":768,"xport":0,"yport":0,"wport":1366,"hport":768,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,},
|
||||
{"inherit":false,"visible":false,"xview":0,"yview":0,"wview":1366,"hview":768,"xport":0,"yport":0,"wport":1366,"hport":768,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,},
|
||||
{"inherit":false,"visible":false,"xview":0,"yview":0,"wview":1366,"hview":768,"xport":0,"yport":0,"wport":1366,"hport":768,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,},
|
||||
{"inherit":false,"visible":false,"xview":0,"yview":0,"wview":1366,"hview":768,"xport":0,"yport":0,"wport":1366,"hport":768,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,},
|
||||
{"inherit":false,"visible":false,"xview":0,"yview":0,"wview":1366,"hview":768,"xport":0,"yport":0,"wport":1366,"hport":768,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,},
|
||||
{"inherit":false,"visible":false,"xview":0,"yview":0,"wview":1366,"hview":768,"xport":0,"yport":0,"wport":1366,"hport":768,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,},
|
||||
{"inherit":false,"visible":false,"xview":0,"yview":0,"wview":1366,"hview":768,"xport":0,"yport":0,"wport":1366,"hport":768,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,},
|
||||
],
|
||||
"layers": [
|
||||
{"instances":[
|
||||
{"properties":[],"isDnd":false,"objectId":{"name":"oOver","path":"objects/oOver/oOver.yy",},"inheritCode":false,"hasCreationCode":false,"colour":4294967295,"rotation":0.0,"scaleX":1.0,"scaleY":1.0,"imageIndex":0,"imageSpeed":1.0,"inheritedItemId":null,"frozen":false,"ignore":false,"inheritItemSettings":false,"x":208.0,"y":80.0,"resourceVersion":"1.0","name":"inst_39EB715D","tags":[],"resourceType":"GMRInstance",},
|
||||
],"visible":true,"depth":0,"userdefinedDepth":false,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":16,"gridY":16,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Instances","tags":[],"resourceType":"GMRInstanceLayer",},
|
||||
{"spriteId":null,"colour":4289967027,"x":0,"y":0,"htiled":false,"vtiled":false,"hspeed":0.0,"vspeed":0.0,"stretch":false,"animationFPS":15.0,"animationSpeedType":0,"userdefinedAnimFPS":false,"visible":true,"depth":100,"userdefinedDepth":false,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Background","tags":[],"resourceType":"GMRBackgroundLayer",},
|
||||
],
|
||||
"inheritLayers": false,
|
||||
"creationCodeFile": "",
|
||||
"inheritCode": false,
|
||||
"instanceCreationOrder": [
|
||||
{"name":"inst_39EB715D","path":"rooms/rWin/rWin.yy",},
|
||||
],
|
||||
"inheritCreationOrder": false,
|
||||
"sequenceId": null,
|
||||
"roomSettings": {
|
||||
"inheritRoomSettings": false,
|
||||
"Width": 432,
|
||||
"Height": 240,
|
||||
"persistent": false,
|
||||
},
|
||||
"viewSettings": {
|
||||
"inheritViewSettings": false,
|
||||
"enableViews": true,
|
||||
"clearViewBackground": false,
|
||||
"clearDisplayBuffer": true,
|
||||
},
|
||||
"physicsSettings": {
|
||||
"inheritPhysicsSettings": false,
|
||||
"PhysicsWorld": false,
|
||||
"PhysicsWorldGravityX": 0.0,
|
||||
"PhysicsWorldGravityY": 10.0,
|
||||
"PhysicsWorldPixToMetres": 0.1,
|
||||
},
|
||||
"parent": {
|
||||
"name": "rooms",
|
||||
"path": "folders/Rooms/rooms.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "rWin",
|
||||
"tags": [],
|
||||
"resourceType": "GMRoom",
|
||||
}
|
|
@ -38,7 +38,7 @@
|
|||
"spriteId": {"name":"sTrou","path":"sprites/sTrou/sTrou.yy",},
|
||||
"timeUnits": 1,
|
||||
"playback": 1,
|
||||
"playbackSpeed": 30.0,
|
||||
"playbackSpeed": 0.0,
|
||||
"playbackSpeedType": 0,
|
||||
"autoRecord": true,
|
||||
"volume": 1.0,
|
||||
|
|
Reference in a new issue