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

beta.r3js.org
-=yb4f310 2018-03-23 14:52:16 +01:00
parent 96eca135ad
commit db4a65dd11
1 changed files with 5 additions and 4 deletions

View File

@ -822,19 +822,20 @@ GameLib.CustomCode.SnakeBody = function(
GameLib.CustomCode.SnakeBody.prototype = Object.create(GameLib.CustomCode.GameObject.prototype); GameLib.CustomCode.SnakeBody.prototype = Object.create(GameLib.CustomCode.GameObject.prototype);
GameLib.CustomCode.SnakeBody.prototype.constructor = GameLib.CustomCode.GameObject; GameLib.CustomCode.SnakeBody.prototype.constructor = GameLib.CustomCode.GameObject;
/*
GameLib.CustomCode.SnakeBody.prototype.clone = function() { GameLib.CustomCode.SnakeBody.prototype.clone = function() {
return new GameLib.CustomCode.SnakeBody( return new GameLib.CustomCode.SnakeBody(
this.type, this.type,
this.mesh, this.mesh,
this.position, {
x : this.position.x,
y : this.position.y
},
this.orientation, this.orientation,
this.flip, this.flip,
this.backupMesh, this.backupMesh,
this.isTail this.isTail
) )
}; };
*/
GameLib.CustomCode.SnakeBody.prototype.applyToMesh = function(updateInstance) { GameLib.CustomCode.SnakeBody.prototype.applyToMesh = function(updateInstance) {
@ -1128,7 +1129,7 @@ GameLib.CustomCode.prototype.createCorner = function(body, temp) {
GameLib.CustomCode.prototype.backup = function() { GameLib.CustomCode.prototype.backup = function() {
this.backupSnake = this.snake.map( this.backupSnake = this.snake.map(
function(body) { function(body) {
return body; return body.clone();
} }
); );
}.bind(this) }.bind(this)