Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 1442 bytes modified
parent
1f0b599d61
commit
b02a42f6e2
|
@ -47,9 +47,10 @@
|
|||
GameLib.CustomCode.BODY_TYPE_BREAD_ONION = 2;
|
||||
GameLib.CustomCode.BODY_TYPE_BREAD_ONION_RING = 3;
|
||||
GameLib.CustomCode.BODY_TYPE_BREAD_PATTY = 4;
|
||||
GameLib.CustomCode.BODY_TYPE_BREAD_HEAD = 5;
|
||||
GameLib.CustomCode.BODY_TYPE_BREAD_TAIL = 6;
|
||||
GameLib.CustomCode.BODY_TYPE_BREAD_CORNER = 7;
|
||||
GameLib.CustomCode.BODY_TYPE_BREAD_TOMATO = 5;
|
||||
GameLib.CustomCode.BODY_TYPE_BREAD_HEAD = 6;
|
||||
GameLib.CustomCode.BODY_TYPE_BREAD_TAIL = 7;
|
||||
GameLib.CustomCode.BODY_TYPE_BREAD_CORNER = 8;
|
||||
|
||||
GameLib.CustomCode.OBJECT_TYPE_NONE = 0;
|
||||
GameLib.CustomCode.OBJECT_TYPE_SNAKE_BODY = 1;
|
||||
|
@ -89,6 +90,7 @@
|
|||
this.materialBreadOnion = GameLib.EntityManager.Instance.findComponentById('69sybcj08d');
|
||||
this.materialBreadOnionRing = GameLib.EntityManager.Instance.findComponentById('kvesyjtr2v');
|
||||
this.materialBreadPatty = GameLib.EntityManager.Instance.findComponentById('k6axym9bu5');
|
||||
this.materialBreadTomato = GameLib.EntityManager.Instance.findComponentById('9wxuzzz5co');
|
||||
this.materialBreadHead = GameLib.EntityManager.Instance.findComponentById('heu4f7zzuh');
|
||||
this.materialBreadTail = GameLib.EntityManager.Instance.findComponentById('mm2yq9rmpf');
|
||||
this.materialBreadCorner = GameLib.EntityManager.Instance.findComponentById('ju9r1bw6cb');
|
||||
|
@ -434,6 +436,9 @@
|
|||
case GameLib.CustomCode.BODY_TYPE_BREAD_PATTY :
|
||||
mesh = this.createGameMesh(this.materialBreadPatty);
|
||||
break;
|
||||
case GameLib.CustomCode.BODY_TYPE_BREAD_TOMATO :
|
||||
mesh = this.createGameMesh(this.materialBreadTomato);
|
||||
break;
|
||||
case GameLib.CustomCode.BODY_TYPE_BREAD_HEAD :
|
||||
mesh = this.createGameMesh(this.materialBreadHead);
|
||||
break;
|
||||
|
@ -785,6 +790,12 @@
|
|||
}
|
||||
|
||||
var body = null;
|
||||
GameLib.CustomCode.FOOD_BACON = 0;
|
||||
GameLib.CustomCode.FOOD_CHEESE = 1;
|
||||
GameLib.CustomCode.FOOD_ONION = 2;
|
||||
GameLib.CustomCode.FOOD_ONION_RING = 3;
|
||||
GameLib.CustomCode.FOOD_PATTY = 4;
|
||||
GameLib.CustomCode.FOOD_TOMATO = 5;
|
||||
|
||||
switch (gameObject.type) {
|
||||
case GameLib.CustomCode.FOOD_BACON :
|
||||
|
@ -795,6 +806,46 @@
|
|||
orientation
|
||||
)
|
||||
break;
|
||||
case GameLib.CustomCode.FOOD_CHEESE :
|
||||
body = this.createGameObject(
|
||||
GameLib.CustomCode.OBJECT_TYPE_SNAKE_BODY,
|
||||
GameLib.CustomCode.BODY_TYPE_BREAD_CHEESE,
|
||||
position,
|
||||
orientation
|
||||
)
|
||||
break;
|
||||
case GameLib.CustomCode.FOOD_ONION :
|
||||
body = this.createGameObject(
|
||||
GameLib.CustomCode.OBJECT_TYPE_SNAKE_BODY,
|
||||
GameLib.CustomCode.BODY_TYPE_BREAD_ONION,
|
||||
position,
|
||||
orientation
|
||||
)
|
||||
break;
|
||||
case GameLib.CustomCode.FOOD_ONION_RING :
|
||||
body = this.createGameObject(
|
||||
GameLib.CustomCode.OBJECT_TYPE_SNAKE_BODY,
|
||||
GameLib.CustomCode.BODY_TYPE_BREAD_ONION_RING,
|
||||
position,
|
||||
orientation
|
||||
)
|
||||
break;
|
||||
case GameLib.CustomCode.FOOD_PATTY :
|
||||
body = this.createGameObject(
|
||||
GameLib.CustomCode.OBJECT_TYPE_SNAKE_BODY,
|
||||
GameLib.CustomCode.BODY_TYPE_BREAD_PATTY,
|
||||
position,
|
||||
orientation
|
||||
)
|
||||
break;
|
||||
case GameLib.CustomCode.FOOD_TOMATO :
|
||||
body = this.createGameObject(
|
||||
GameLib.CustomCode.OBJECT_TYPE_SNAKE_BODY,
|
||||
GameLib.CustomCode.BODY_TYPE_BREAD_TOMATO,
|
||||
position,
|
||||
orientation
|
||||
)
|
||||
break;
|
||||
default :
|
||||
throw new Error('unhandled food type: ' + gameObject.type);
|
||||
}
|
||||
|
@ -863,7 +914,7 @@
|
|||
this.explode(body.position);
|
||||
break;
|
||||
case GameLib.CustomCode.OBJECT_TYPE_FOOD :
|
||||
this.extend(gameObject);
|
||||
this.extend(gameObject, body.position, body.orientation);
|
||||
break;
|
||||
case GameLib.CustomCode.OBJECT_TYPE_POWERUP:
|
||||
this.powerup(gameObject);
|
||||
|
|
Loading…
Reference in New Issue