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

beta.r3js.org
-=yb4f310 2018-03-21 12:00:34 +01:00
parent ec01a70651
commit 4e6179589d
1 changed files with 4 additions and 6 deletions

View File

@ -413,8 +413,6 @@ GameLib.CustomCode.prototype.advanceSnake = function(delta) {
body.orientation = backup.orientation;
body.flip = backup.flip;
if (body.backupMesh) {
/**
* We used to be a corner, change back
@ -454,19 +452,19 @@ GameLib.CustomCode.prototype.advanceSnake = function(delta) {
body.backupMesh = body.mesh;
if (temp.orientation === GameLib.CustomCode.ORIENTATION_UP) {
body.backupMesh.position.y -= 0.5;
body.backupMesh.position.y -= 0.5 * GameLib.CustomCode.BODY_SCALE_Y;
}
if (temp.orientation === GameLib.CustomCode.ORIENTATION_DOWN) {
body.backupMesh.position.y += 0.5;
body.backupMesh.position.y += 0.5 * GameLib.CustomCode.BODY_SCALE_Y;
}
if (temp.orientation === GameLib.CustomCode.ORIENTATION_LEFT) {
body.backupMesh.position.x += 0.5;
body.backupMesh.position.x += 0.5 * GameLib.CustomCode.BODY_SCALE_X;
}
if (temp.orientation === GameLib.CustomCode.ORIENTATION_RIGHT) {
body.backupMesh.position.x -= 0.5;
body.backupMesh.position.x -= 0.5 * GameLib.CustomCode.BODY_SCALE_X;
}
//body.backupMesh.visible = false;