4
0
Fork 0

Selection random du monstre

This commit is contained in:
rick 2020-12-06 00:59:34 +01:00
parent 0efb42d426
commit d41407ce5d
3 changed files with 61 additions and 37 deletions

View file

@ -7,4 +7,9 @@ dir = 3;
pv = 5;
attack = 1;
attack = 1;
enum typeMelee {
squelette,
blob
}

View file

@ -0,0 +1,17 @@
event_inherited();
randomize();
monType = choose(typeMelee.squelette, typeMelee.blob);
image_speed = 1;
switch (monType) {
case typeMelee.squelette:
attack = 10;
sprite_index = sSkeletonR;
break;
case typeMelee.blob:
sprite_index = sBlobR;
break;
default:
break;
}

View file

@ -1,37 +1,39 @@
{
"spriteId": {
"name": "sMonsterMelee",
"path": "sprites/sMonsterMelee/sMonsterMelee.yy",
},
"solid": false,
"visible": true,
"spriteMaskId": null,
"persistent": false,
"parentObjectId": {
"name": "oMonster",
"path": "objects/oMonster/oMonster.yy",
},
"physicsObject": false,
"physicsSensor": false,
"physicsShape": 1,
"physicsGroup": 1,
"physicsDensity": 0.5,
"physicsRestitution": 0.1,
"physicsLinearDamping": 0.1,
"physicsAngularDamping": 0.1,
"physicsFriction": 0.2,
"physicsStartAwake": true,
"physicsKinematic": false,
"physicsShapePoints": [],
"eventList": [],
"properties": [],
"overriddenProperties": [],
"parent": {
"name": "Entity",
"path": "folders/Objects/Entity.yy",
},
"resourceVersion": "1.0",
"name": "oMonsterMelee",
"tags": [],
"resourceType": "GMObject",
{
"spriteId": {
"name": "sMonsterMelee",
"path": "sprites/sMonsterMelee/sMonsterMelee.yy",
},
"solid": false,
"visible": true,
"spriteMaskId": null,
"persistent": false,
"parentObjectId": {
"name": "oMonster",
"path": "objects/oMonster/oMonster.yy",
},
"physicsObject": false,
"physicsSensor": false,
"physicsShape": 1,
"physicsGroup": 1,
"physicsDensity": 0.5,
"physicsRestitution": 0.1,
"physicsLinearDamping": 0.1,
"physicsAngularDamping": 0.1,
"physicsFriction": 0.2,
"physicsStartAwake": true,
"physicsKinematic": false,
"physicsShapePoints": [],
"eventList": [
{"isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,"parent":{"name":"oMonsterMelee","path":"objects/oMonsterMelee/oMonsterMelee.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
],
"properties": [],
"overriddenProperties": [],
"parent": {
"name": "Entity",
"path": "folders/Objects/Entity.yy",
},
"resourceVersion": "1.0",
"name": "oMonsterMelee",
"tags": [],
"resourceType": "GMObject",
}