Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 203 bytes modified

beta.r3js.org
-=yb4f310 2018-03-15 11:25:17 +01:00
parent 305abbb78c
commit 548f2a9712
1 changed files with 9 additions and 1 deletions

View File

@ -9,6 +9,7 @@ if (this.parentEntity === data.entity) {
*/
GameLib.CustomCode.BODY_TYPE_NORMAL = 0x1;
GameLib.CustomCode.BODY_TYPE_TAIL = 0x2;
GameLib.CustomCode.BODY_TYPE_CORNER = 0x3;
GameLib.CustomCode.GRID_WIDTH = 11;
GameLib.CustomCode.GRID_HEIGHT = 11;
@ -129,7 +130,8 @@ this.meshPatty = this.createGameMesh(this.imagePatty);
GameLib.CustomCode.SnakeBody = function(
mesh,
position,
orientation
orientation,
bodyType
) {
if (GameLib.Utils.UndefinedOrNull(mesh)) {
@ -150,6 +152,12 @@ GameLib.CustomCode.SnakeBody = function(
}
this.orientation = orientation;
if (GameLib.Utils.UndefinedOrNull(bodyType)) {
bodyType = GameLib.CustomCode.BODY_TYPE_NORMAL;
}
this.orientation = orientation;
this.applyToMesh();
};