diff --git a/ff0fsum4zx.js b/ff0fsum4zx.js index 3fa4a5d..36624fc 100644 --- a/ff0fsum4zx.js +++ b/ff0fsum4zx.js @@ -14,7 +14,7 @@ this.beforeRender = R3.EntityManager.Instance.findComponentById('7l8ar325qf'); /** * Meshes */ -this.footballPlayer = R3.EntityManager.Instance.findComponentById('t537n02x0s'); +this.footballPlayer = R3.EntityManager.Instance.findComponentById('14xd9d1oqd'); this.football = R3.EntityManager.Instance.findComponentById('umgbzb0ur2'); this.goalL = R3.EntityManager.Instance.findComponentById('ackykfwyd4'); this.goalR = R3.EntityManager.Instance.findComponentById('040yhx0atm'); @@ -57,7 +57,7 @@ this.kickDistance = 0; this.raycaster = new THREE.Raycaster(); -this.debug = true; +this.debug = false; this.gravity = -9.8; @@ -67,7 +67,7 @@ this.startRayZ = -2; this.endRayZ = -2.5; -this.playerY = 0.375; +this.playerY = 0.389; this.ballY = this.football.instance.geometry.boundingSphere.radius / 2; @@ -136,6 +136,13 @@ R3.CustomCode.prototype.render = function(delta) { name : 'Audio - Crowd Cheer' } ); + R3.Event.Emit( + R3.Event.GAME_DATA, + { + type : 'score', + goal : 'left' + } + ); } } @@ -150,6 +157,13 @@ R3.CustomCode.prototype.render = function(delta) { name : 'Audio - Crowd Cheer' } ); + R3.Event.Emit( + R3.Event.GAME_DATA, + { + type : 'score', + goal : 'right' + } + ); } } @@ -410,7 +424,7 @@ R3.Event.Subscribe( this.mouseMove.entityLoaded = this; this.touchMove.entityLoaded = this; this.beforeRender.entityLoaded = this; - } + }.bind(this) ); R3.Event.Emit(R3.Event.GAME_LOADED);