Update: CC - Entity Loaded - AR Football 3 (ff0fsum4zx.js) 6 bytes modified

beta.r3js.org
-=yb4f310 2018-05-28 09:11:40 +02:00
parent 035be51baa
commit ec2fda4475
1 changed files with 6 additions and 3 deletions

View File

@ -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