Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 56 bytes modified
parent
0f4d6be12d
commit
7464653f15
|
@ -122,14 +122,12 @@ GameLib.CustomCode.SnakeBody = function(
|
||||||
if (GameLib.Utils.UndefinedOrNull(mesh)) {
|
if (GameLib.Utils.UndefinedOrNull(mesh)) {
|
||||||
throw new Error('no mesh specified');
|
throw new Error('no mesh specified');
|
||||||
}
|
}
|
||||||
this.mesh = mesh;
|
this.mesh = mesh.clone();
|
||||||
|
|
||||||
switch (this.bodyType) {
|
switch (this.bodyType) {
|
||||||
case GameLib.CustomCode.BODY_TYPE_HEAD :
|
case GameLib.CustomCode.BODY_TYPE_HEAD :
|
||||||
mesh = this.meshEnd.clone();
|
|
||||||
break;
|
break;
|
||||||
case GameLib.CustomCode.BODY_TYPE_TAIL :
|
case GameLib.CustomCode.BODY_TYPE_TAIL :
|
||||||
mesh = this.meshEnd.clone();
|
|
||||||
mesh.rotation.z = Math.PI;
|
mesh.rotation.z = Math.PI;
|
||||||
mesh.updateInstance('rotation');
|
mesh.updateInstance('rotation');
|
||||||
position.x += 1;
|
position.x += 1;
|
||||||
|
|
Loading…
Reference in New Issue