4
0
Fork 0

objet transition

This commit is contained in:
sOlaris38 2020-12-06 14:34:06 +01:00
parent 3c8e8dfd6a
commit e674951e22
13 changed files with 39 additions and 15 deletions

View file

@ -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,},

View file

@ -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);

View file

View file

@ -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",

View file

@ -0,0 +1 @@
next = transition.down;

View file

@ -0,0 +1 @@
next = transition.top;

View file

@ -0,0 +1 @@
next = transition.right;

View file

@ -0,0 +1 @@
next = transition.left;

View file

@ -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,

View file

@ -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);
}
if (objAttaque.pv <= 0) instance_destroy(objAttaque);
else knockBack(objAttaquant, objAttaque);
}
/*

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

After

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

After

Width:  |  Height:  |  Size: 86 B

View file

@ -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",},