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;
|
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": {
|
"spriteId": {
|
||||||
"name": "sMonsterMelee",
|
"name": "sMonsterMelee",
|
||||||
"path": "sprites/sMonsterMelee/sMonsterMelee.yy",
|
"path": "sprites/sMonsterMelee/sMonsterMelee.yy",
|
||||||
},
|
},
|
||||||
"solid": false,
|
"solid": false,
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"spriteMaskId": null,
|
"spriteMaskId": null,
|
||||||
"persistent": false,
|
"persistent": false,
|
||||||
"parentObjectId": {
|
"parentObjectId": {
|
||||||
"name": "oMonster",
|
"name": "oMonster",
|
||||||
"path": "objects/oMonster/oMonster.yy",
|
"path": "objects/oMonster/oMonster.yy",
|
||||||
},
|
},
|
||||||
"physicsObject": false,
|
"physicsObject": false,
|
||||||
"physicsSensor": false,
|
"physicsSensor": false,
|
||||||
"physicsShape": 1,
|
"physicsShape": 1,
|
||||||
"physicsGroup": 1,
|
"physicsGroup": 1,
|
||||||
"physicsDensity": 0.5,
|
"physicsDensity": 0.5,
|
||||||
"physicsRestitution": 0.1,
|
"physicsRestitution": 0.1,
|
||||||
"physicsLinearDamping": 0.1,
|
"physicsLinearDamping": 0.1,
|
||||||
"physicsAngularDamping": 0.1,
|
"physicsAngularDamping": 0.1,
|
||||||
"physicsFriction": 0.2,
|
"physicsFriction": 0.2,
|
||||||
"physicsStartAwake": true,
|
"physicsStartAwake": true,
|
||||||
"physicsKinematic": false,
|
"physicsKinematic": false,
|
||||||
"physicsShapePoints": [],
|
"physicsShapePoints": [],
|
||||||
"eventList": [],
|
"eventList": [
|
||||||
"properties": [],
|
{"isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,"parent":{"name":"oMonsterMelee","path":"objects/oMonsterMelee/oMonsterMelee.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
|
||||||
"overriddenProperties": [],
|
],
|
||||||
"parent": {
|
"properties": [],
|
||||||
"name": "Entity",
|
"overriddenProperties": [],
|
||||||
"path": "folders/Objects/Entity.yy",
|
"parent": {
|
||||||
},
|
"name": "Entity",
|
||||||
"resourceVersion": "1.0",
|
"path": "folders/Objects/Entity.yy",
|
||||||
"name": "oMonsterMelee",
|
},
|
||||||
"tags": [],
|
"resourceVersion": "1.0",
|
||||||
"resourceType": "GMObject",
|
"name": "oMonsterMelee",
|
||||||
|
"tags": [],
|
||||||
|
"resourceType": "GMObject",
|
||||||
}
|
}
|
Reference in a new issue