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

beta.r3js.org
-=yb4f310 2018-03-20 10:23:14 +01:00
parent 93d9dccbc5
commit 3cb7356274
1 changed files with 16 additions and 2 deletions

View File

@ -332,8 +332,22 @@ GameLib.CustomCode.prototype.advanceSnake = function(delta) {
body.orientation = backup.orientation;
body.backupMesh = body.mesh;
body.backupMesh.position.y -= 0.5;
if (temp.orientation === GameLib.CustomCode.ORIENTATION_UP) {
body.backupMesh.position.y -= 0.5;
}
if (temp.orientation === GameLib.CustomCode.ORIENTATION_DOWN) {
body.backupMesh.position.y += 0.5;
}
if (temp.orientation === GameLib.CustomCode.ORIENTATION_LEFT) {
body.backupMesh.position.x += 0.5;
}
if (temp.orientation === GameLib.CustomCode.ORIENTATION_RIGHT) {
body.backupMesh.position.x -= 0.5;
}
//body.backupMesh.visible = false;