Update: CC - Entity Loaded - AR Football 3 (ff0fsum4zx.js) 6 bytes modified
parent
035be51baa
commit
ec2fda4475
|
@ -41,7 +41,7 @@ this.playerRotation = {
|
||||||
y : 0
|
y : 0
|
||||||
};
|
};
|
||||||
|
|
||||||
R3.CustomCode.TIME_LIMIT = 1.5 * 90;
|
R3.CustomCode.TIME_LIMIT = 90;
|
||||||
|
|
||||||
this.balls = [];
|
this.balls = [];
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@ R3.CustomCode.prototype.render = function(delta) {
|
||||||
var goalDistanceL = this.goalL.position.distanceTo(ball.mesh.position);
|
var goalDistanceL = this.goalL.position.distanceTo(ball.mesh.position);
|
||||||
var goalDistanceR = this.goalR.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) {
|
if (ball.scored === false) {
|
||||||
console.log('left goal!');
|
console.log('left goal!');
|
||||||
ball.scored = true;
|
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) {
|
if (ball.scored === false) {
|
||||||
console.log('right goal!');
|
console.log('right goal!');
|
||||||
ball.scored = true;
|
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.position.y = this.ballY;
|
||||||
this.football.instance.visible = false;
|
this.football.instance.visible = false;
|
||||||
|
|
||||||
|
this.goalL.geometry.instance.computeBoundingSphere();
|
||||||
|
this.goalR.geometry.instance.computeBoundingSphere();
|
||||||
|
|
||||||
R3.Event.Emit(R3.Event.GAME_LOADED);
|
R3.Event.Emit(R3.Event.GAME_LOADED);
|
||||||
|
|
||||||
//@ sourceURL=entityLoaded.js
|
//@ sourceURL=entityLoaded.js
|
||||||
|
|
Loading…
Reference in New Issue