From ec2fda4475faadb41176c3ef7446504566045287 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Mon, 28 May 2018 09:11:40 +0200 Subject: [PATCH 1/5] Update: CC - Entity Loaded - AR Football 3 (ff0fsum4zx.js) 6 bytes modified --- ff0fsum4zx.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ff0fsum4zx.js b/ff0fsum4zx.js index 92faf75..7fac407 100644 --- a/ff0fsum4zx.js +++ b/ff0fsum4zx.js @@ -41,7 +41,7 @@ this.playerRotation = { y : 0 }; -R3.CustomCode.TIME_LIMIT = 1.5 * 90; +R3.CustomCode.TIME_LIMIT = 90; this.balls = []; @@ -188,7 +188,7 @@ R3.CustomCode.prototype.render = function(delta) { var goalDistanceL = this.goalL.position.distanceTo(ball.mesh.position); var goalDistanceR = this.goalR.position.distanceTo(ball.mesh.position); - if (goalDistanceL < (this.goalL.geometry.boundingSphere.radius - ball.mesh.geometry.boundingSphere.radius)) { + if (goalDistanceL < (this.goalL.geometry.instance.boundingSphere.radius - ball.mesh.geometry.boundingSphere.radius)) { if (ball.scored === false) { console.log('left goal!'); ball.scored = true; @@ -209,7 +209,7 @@ R3.CustomCode.prototype.render = function(delta) { } } - if (goalDistanceR < (this.goalR.geometry.boundingSphere.radius - ball.mesh.geometry.boundingSphere.radius)) { + if (goalDistanceR < (this.goalR.geometry.instance.boundingSphere.radius - ball.mesh.geometry.boundingSphere.radius)) { if (ball.scored === false) { console.log('right goal!'); ball.scored = true; @@ -573,6 +573,9 @@ this.footballPlayer.instance.position.z = this.football.instance.geometry.boundi this.football.instance.position.y = this.ballY; this.football.instance.visible = false; +this.goalL.geometry.instance.computeBoundingSphere(); +this.goalR.geometry.instance.computeBoundingSphere(); + R3.Event.Emit(R3.Event.GAME_LOADED); //@ sourceURL=entityLoaded.js From c4aec6492f55929e1e46b8bf181e4e86401aea21 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Mon, 28 May 2018 17:13:37 +0200 Subject: [PATCH 2/5] Update: CC - Touch Move - AR Football 3 (p49pad0i7l.js) 1 bytes modified --- p49pad0i7l.js | 1 - 1 file changed, 1 deletion(-) diff --git a/p49pad0i7l.js b/p49pad0i7l.js index 23e5a26..190d333 100644 --- a/p49pad0i7l.js +++ b/p49pad0i7l.js @@ -1,4 +1,3 @@ - if (!this.entityLoaded) { return; } From bd4743d44e0344c3faf6d04a047f4b1317b93182 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Mon, 28 May 2018 17:13:38 +0200 Subject: [PATCH 3/5] Update: CC - Mouse Move - AR Football 3 (dwxvtxzrun.js) 1 bytes modified --- dwxvtxzrun.js | 1 - 1 file changed, 1 deletion(-) diff --git a/dwxvtxzrun.js b/dwxvtxzrun.js index 76e4577..6c245a6 100644 --- a/dwxvtxzrun.js +++ b/dwxvtxzrun.js @@ -1,4 +1,3 @@ - if (!this.entityLoaded) { return; } From 61d43d317d2289502379799984207883108768ba Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Mon, 28 May 2018 17:13:38 +0200 Subject: [PATCH 4/5] Update: CC - Entity Loaded - AR Football 3 (ff0fsum4zx.js) 72 bytes modified --- ff0fsum4zx.js | 54 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 38 insertions(+), 16 deletions(-) diff --git a/ff0fsum4zx.js b/ff0fsum4zx.js index 7fac407..522120e 100644 --- a/ff0fsum4zx.js +++ b/ff0fsum4zx.js @@ -41,7 +41,7 @@ this.playerRotation = { y : 0 }; -R3.CustomCode.TIME_LIMIT = 90; +R3.CustomCode.TIME_LIMIT = 45; this.balls = []; @@ -79,6 +79,10 @@ this.ballY = this.football.instance.geometry.boundingSphere.radius / 2; this.activeBall = null; +this.invertY = true; + +this.invertX = true; + if (this.debug) { this.arrowHelper = new THREE.ArrowHelper( new THREE.Vector3(0,0,-1), @@ -108,17 +112,13 @@ R3.CustomCode.prototype.render = function(delta) { this.totalTime -= delta; - this.secondCounter += delta; - if (this.secondCounter >= 1) { - this.secondCounter -= 1; - R3.Event.Emit( - R3.Event.GAME_DATA, - { - type : 'timer', - time : Math.round(this.totalTime) - } - ) - } + R3.Event.Emit( + R3.Event.GAME_DATA, + { + type : 'timer', + time : this.totalTime + } + ) if (this.totalTime <= 0) { @@ -138,7 +138,8 @@ R3.CustomCode.prototype.render = function(delta) { return result; }, [] - ) + ), + totalBalls : this.balls.length } ) } @@ -307,10 +308,31 @@ R3.CustomCode.prototype.render = function(delta) { R3.CustomCode.prototype.move = function(data) { - var x = data.x || 0; - var y = data.y || 0; - x *= 0.0025; + var x = 0; + + if (data && data.x) { + if (this.invertX) { + x = data.x; + } else { + x = -data.x; + } + } + + var y = 0; + + if (data && data.y) { + + if (this.invertY) { + y = data.y; + } else { + y = -data.y; + } + + } + + x *= 0.0025; y *= 0.0075; + this.playerRotation.x += x; this.playerRotation.y += y; From d1ddac4a5b23f68a1a531699b950197eb4baaba6 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Mon, 28 May 2018 17:13:38 +0200 Subject: [PATCH 5/5] Initial Commit: CC - Key Up - AR Football 3 (r5kzahijoq.js) --- r5kzahijoq.js | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 r5kzahijoq.js diff --git a/r5kzahijoq.js b/r5kzahijoq.js new file mode 100644 index 0000000..b087bbc --- /dev/null +++ b/r5kzahijoq.js @@ -0,0 +1,7 @@ +if (!this.entityLoaded) { + return; +} + +console.log(data); + +//@ sourceURL=keyDown.js \ No newline at end of file