Selection random du monstre
This commit is contained in:
parent
0efb42d426
commit
d41407ce5d
3 changed files with 61 additions and 37 deletions
|
@ -7,4 +7,9 @@ dir = 3;
|
|||
|
||||
pv = 5;
|
||||
|
||||
attack = 1;
|
||||
attack = 1;
|
||||
|
||||
enum typeMelee {
|
||||
squelette,
|
||||
blob
|
||||
}
|
17
objects/oMonsterMelee/Create_0.gml
Normal file
17
objects/oMonsterMelee/Create_0.gml
Normal 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;
|
||||
}
|
|
@ -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",
|
||||
}
|
Reference in a new issue