Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 89 bytes modified
parent
5866a04063
commit
28c6d52732
|
@ -638,6 +638,7 @@ GameLib.CustomCode.prototype.createGameObject = function(
|
||||||
gameObject.applyToMesh(true);
|
gameObject.applyToMesh(true);
|
||||||
break;
|
break;
|
||||||
case GameLib.CustomCode.OBJECT_TYPE_SNAKE_BODY:
|
case GameLib.CustomCode.OBJECT_TYPE_SNAKE_BODY:
|
||||||
|
|
||||||
gameObject = new GameLib.CustomCode.SnakeBody(
|
gameObject = new GameLib.CustomCode.SnakeBody(
|
||||||
type,
|
type,
|
||||||
mesh,
|
mesh,
|
||||||
|
@ -648,6 +649,9 @@ GameLib.CustomCode.prototype.createGameObject = function(
|
||||||
isTail
|
isTail
|
||||||
)
|
)
|
||||||
gameObject.applyToMesh(true);
|
gameObject.applyToMesh(true);
|
||||||
|
|
||||||
|
this.animation.meshes.push(gameObject.mesh);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Error('unhandled object type: ' + objectType);
|
throw new Error('unhandled object type: ' + objectType);
|
||||||
|
@ -817,12 +821,6 @@ GameLib.CustomCode.SnakeBody = function(
|
||||||
isTail = false;
|
isTail = false;
|
||||||
}
|
}
|
||||||
this.isTail = isTail;
|
this.isTail = isTail;
|
||||||
|
|
||||||
this.applyToMesh();
|
|
||||||
|
|
||||||
var animation = GameLib.EntityManager.Instance.findComponentById('8kb7utb2fn');
|
|
||||||
|
|
||||||
animation.meshes.push(this.mesh);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GameLib.CustomCode.SnakeBody.prototype = Object.create(GameLib.CustomCode.GameObject.prototype);
|
GameLib.CustomCode.SnakeBody.prototype = Object.create(GameLib.CustomCode.GameObject.prototype);
|
||||||
|
|
Loading…
Reference in New Issue