Selection random du monstre
This commit is contained in:
parent
0efb42d426
commit
d41407ce5d
3 changed files with 61 additions and 37 deletions
|
@ -8,3 +8,8 @@ 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;
|
||||||
|
}
|
|
@ -23,7 +23,9 @@
|
||||||
"physicsStartAwake": true,
|
"physicsStartAwake": true,
|
||||||
"physicsKinematic": false,
|
"physicsKinematic": false,
|
||||||
"physicsShapePoints": [],
|
"physicsShapePoints": [],
|
||||||
"eventList": [],
|
"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": [],
|
"properties": [],
|
||||||
"overriddenProperties": [],
|
"overriddenProperties": [],
|
||||||
"parent": {
|
"parent": {
|
||||||
|
|
Reference in a new issue