diff --git a/Surprise Dungeon.yyp b/Surprise Dungeon.yyp
index ccc903b..3afbd53 100644
--- a/Surprise Dungeon.yyp
+++ b/Surprise Dungeon.yyp
@@ -8,6 +8,7 @@
{"id":{"name":"oGame","path":"objects/oGame/oGame.yy",},"order":4,},
{"id":{"name":"TileSet1","path":"tilesets/TileSet1/TileSet1.yy",},"order":0,},
{"id":{"name":"sWalls","path":"sprites/sWalls/sWalls.yy",},"order":7,},
+ {"id":{"name":"oTransition","path":"objects/oTransition/oTransition.yy",},"order":5,},
{"id":{"name":"r1","path":"rooms/r1/r1.yy",},"order":11,},
{"id":{"name":"r6","path":"rooms/r6/r6.yy",},"order":16,},
{"id":{"name":"rType","path":"rooms/rType/rType.yy",},"order":0,},
@@ -17,6 +18,7 @@
{"id":{"name":"r8","path":"rooms/r8/r8.yy",},"order":18,},
{"id":{"name":"sStone","path":"sprites/sStone/sStone.yy",},"order":5,},
{"id":{"name":"oMaudit","path":"objects/oMaudit/oMaudit.yy",},"order":2,},
+ {"id":{"name":"sTransition","path":"sprites/sTransition/sTransition.yy",},"order":16,},
{"id":{"name":"r0","path":"rooms/r0/r0.yy",},"order":21,},
{"id":{"name":"r9","path":"rooms/r9/r9.yy",},"order":19,},
{"id":{"name":"oMonster","path":"objects/oMonster/oMonster.yy",},"order":1,},
diff --git a/objects/oGame/Create_0.gml b/objects/oGame/Create_0.gml
index 1bf1031..db5c742 100644
--- a/objects/oGame/Create_0.gml
+++ b/objects/oGame/Create_0.gml
@@ -13,6 +13,14 @@ for (i = 0; i < 4; i++)
global.difficulty = 1;
global.minutes = 1;
global.secondes = 20;
+
+enum transition {
+ left,
+ right,
+ up,
+ down
+}
+
perdu = false;
posX = irandom(3);
diff --git a/objects/oTransition/Create_0.gml b/objects/oTransition/Create_0.gml
new file mode 100644
index 0000000..e69de29
diff --git a/objects/oTransition/oTransition.yy b/objects/oTransition/oTransition.yy
index a0643f9..2336829 100644
--- a/objects/oTransition/oTransition.yy
+++ b/objects/oTransition/oTransition.yy
@@ -20,8 +20,13 @@
"physicsStartAwake": true,
"physicsKinematic": false,
"physicsShapePoints": [],
- "eventList": [],
- "properties": [],
+ "eventList": [
+ {"isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,"parent":{"name":"oTransition","path":"objects/oTransition/oTransition.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
+ {"isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,"parent":{"name":"oTransition","path":"objects/oTransition/oTransition.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
+ ],
+ "properties": [
+ {"varType":4,"value":"transition.left","rangeEnabled":false,"rangeMin":0.0,"rangeMax":10.0,"listItems":[],"multiselect":false,"filters":[],"resourceVersion":"1.0","name":"next","tags":[],"resourceType":"GMObjectProperty",},
+ ],
"overriddenProperties": [],
"parent": {
"name": "Objects",
diff --git a/rooms/rType/InstanceCreationCode_inst_2CF67492.gml b/rooms/rType/InstanceCreationCode_inst_2CF67492.gml
new file mode 100644
index 0000000..5553b19
--- /dev/null
+++ b/rooms/rType/InstanceCreationCode_inst_2CF67492.gml
@@ -0,0 +1 @@
+next = transition.down;
\ No newline at end of file
diff --git a/rooms/rType/InstanceCreationCode_inst_33482310.gml b/rooms/rType/InstanceCreationCode_inst_33482310.gml
new file mode 100644
index 0000000..762088d
--- /dev/null
+++ b/rooms/rType/InstanceCreationCode_inst_33482310.gml
@@ -0,0 +1 @@
+next = transition.top;
\ No newline at end of file
diff --git a/rooms/rType/InstanceCreationCode_inst_7E9DFE94.gml b/rooms/rType/InstanceCreationCode_inst_7E9DFE94.gml
new file mode 100644
index 0000000..4bc13a5
--- /dev/null
+++ b/rooms/rType/InstanceCreationCode_inst_7E9DFE94.gml
@@ -0,0 +1 @@
+next = transition.right;
\ No newline at end of file
diff --git a/rooms/rType/InstanceCreationCode_inst_DF7EF93.gml b/rooms/rType/InstanceCreationCode_inst_DF7EF93.gml
new file mode 100644
index 0000000..6cc6b44
--- /dev/null
+++ b/rooms/rType/InstanceCreationCode_inst_DF7EF93.gml
@@ -0,0 +1 @@
+next = transition.left;
\ No newline at end of file
diff --git a/rooms/rType/rType.yy b/rooms/rType/rType.yy
index 2411efa..ce8afcc 100644
--- a/rooms/rType/rType.yy
+++ b/rooms/rType/rType.yy
@@ -82,6 +82,10 @@
{"properties":[],"isDnd":false,"objectId":{"name":"oWall","path":"objects/oWall/oWall.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":16.0,"y":208.0,"resourceVersion":"1.0","name":"inst_56CAC8A8","tags":[],"resourceType":"GMRInstance",},
{"properties":[],"isDnd":false,"objectId":{"name":"oWall","path":"objects/oWall/oWall.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":400.0,"y":32.0,"resourceVersion":"1.0","name":"inst_54D90856","tags":[],"resourceType":"GMRInstance",},
{"properties":[],"isDnd":false,"objectId":{"name":"oWall","path":"objects/oWall/oWall.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":400.0,"y":16.0,"resourceVersion":"1.0","name":"inst_35D0D","tags":[],"resourceType":"GMRInstance",},
+ {"properties":[],"isDnd":false,"objectId":{"name":"oTransition","path":"objects/oTransition/oTransition.yy",},"inheritCode":false,"hasCreationCode":true,"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":400.0,"y":112.0,"resourceVersion":"1.0","name":"inst_7E9DFE94","tags":[],"resourceType":"GMRInstance",},
+ {"properties":[],"isDnd":false,"objectId":{"name":"oTransition","path":"objects/oTransition/oTransition.yy",},"inheritCode":false,"hasCreationCode":true,"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":16.0,"resourceVersion":"1.0","name":"inst_33482310","tags":[],"resourceType":"GMRInstance",},
+ {"properties":[],"isDnd":false,"objectId":{"name":"oTransition","path":"objects/oTransition/oTransition.yy",},"inheritCode":false,"hasCreationCode":true,"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":208.0,"resourceVersion":"1.0","name":"inst_2CF67492","tags":[],"resourceType":"GMRInstance",},
+ {"properties":[],"isDnd":false,"objectId":{"name":"oTransition","path":"objects/oTransition/oTransition.yy",},"inheritCode":false,"hasCreationCode":true,"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":16.0,"y":112.0,"resourceVersion":"1.0","name":"inst_DF7EF93","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",},
{"assets":[],"visible":true,"depth":100,"userdefinedDepth":false,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":16,"gridY":16,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Assets_1","tags":[],"resourceType":"GMRAssetLayer",},
{"tilesetId":{"name":"TileSet1","path":"tilesets/TileSet1/TileSet1.yy",},"x":0,"y":0,"tiles":{"SerialiseWidth":27,"SerialiseHeight":15,"TileSerialiseData":[
@@ -175,6 +179,10 @@
{"name":"inst_56CAC8A8","path":"rooms/rType/rType.yy",},
{"name":"inst_54D90856","path":"rooms/rType/rType.yy",},
{"name":"inst_35D0D","path":"rooms/rType/rType.yy",},
+ {"name":"inst_7E9DFE94","path":"rooms/rType/rType.yy",},
+ {"name":"inst_33482310","path":"rooms/rType/rType.yy",},
+ {"name":"inst_2CF67492","path":"rooms/rType/rType.yy",},
+ {"name":"inst_DF7EF93","path":"rooms/rType/rType.yy",},
],
"inheritCreationOrder": false,
"sequenceId": null,
diff --git a/scripts/Script1/Script1.gml b/scripts/Script1/Script1.gml
index 3049958..2129a51 100644
--- a/scripts/Script1/Script1.gml
+++ b/scripts/Script1/Script1.gml
@@ -28,12 +28,9 @@ function knockBack(obj, objRepousse) {
@param {degats} dégâts infligés (permet de gérer les attaques cac ou distance pour le joueur
*/
function hit(objAttaquant, objAttaque, degats) {
- if (objAttaque.pv <= 0) {
- instance_destroy(objAttaque);
- } else {
- objAttaque.pv -= degats;
- knockBack(objAttaquant, objAttaque);
- }
+ objAttaque.pv -= degats;
+ if (objAttaque.pv <= 0) instance_destroy(objAttaque);
+ else knockBack(objAttaquant, objAttaque);
}
/*
diff --git a/sprites/sTransition/0f4db48c-d507-40f5-a203-9dcab4e57fe4.png b/sprites/sTransition/0f4db48c-d507-40f5-a203-9dcab4e57fe4.png
index 390a169..a237f66 100644
Binary files a/sprites/sTransition/0f4db48c-d507-40f5-a203-9dcab4e57fe4.png and b/sprites/sTransition/0f4db48c-d507-40f5-a203-9dcab4e57fe4.png differ
diff --git a/sprites/sTransition/layers/0f4db48c-d507-40f5-a203-9dcab4e57fe4/490f3754-fe04-4547-bba9-b42dd0ece39a.png b/sprites/sTransition/layers/0f4db48c-d507-40f5-a203-9dcab4e57fe4/490f3754-fe04-4547-bba9-b42dd0ece39a.png
index 390a169..a237f66 100644
Binary files a/sprites/sTransition/layers/0f4db48c-d507-40f5-a203-9dcab4e57fe4/490f3754-fe04-4547-bba9-b42dd0ece39a.png and b/sprites/sTransition/layers/0f4db48c-d507-40f5-a203-9dcab4e57fe4/490f3754-fe04-4547-bba9-b42dd0ece39a.png differ
diff --git a/sprites/sTransition/sTransition.yy b/sprites/sTransition/sTransition.yy
index 4f4ca1c..4c994d5 100644
--- a/sprites/sTransition/sTransition.yy
+++ b/sprites/sTransition/sTransition.yy
@@ -2,20 +2,20 @@
"bboxMode": 0,
"collisionKind": 1,
"type": 0,
- "origin": 4,
+ "origin": 0,
"preMultiplyAlpha": false,
"edgeFiltering": false,
"collisionTolerance": 0,
"swfPrecision": 2.525,
"bbox_left": 0,
- "bbox_right": 31,
+ "bbox_right": 15,
"bbox_top": 0,
- "bbox_bottom": 31,
+ "bbox_bottom": 15,
"HTile": false,
"VTile": false,
"For3D": false,
- "width": 32,
- "height": 32,
+ "width": 16,
+ "height": 16,
"textureGroupId": {
"name": "Default",
"path": "texturegroups/Default",
@@ -54,8 +54,8 @@
"backdropHeight": 768,
"backdropXOffset": 0.0,
"backdropYOffset": 0.0,
- "xorigin": 16,
- "yorigin": 16,
+ "xorigin": 0,
+ "yorigin": 0,
"eventToFunction": {},
"eventStubScript": null,
"parent": {"name":"sTransition","path":"sprites/sTransition/sTransition.yy",},