diff --git a/js/prototype/ReplayCamera.js b/js/prototype/ReplayCamera.js index 5bbf89a..83d029c 100644 --- a/js/prototype/ReplayCamera.js +++ b/js/prototype/ReplayCamera.js @@ -2,7 +2,7 @@ var ReplayCamera = function() { THREE.PerspectiveCamera.apply(this, arguments); - this.cameras = arguments[4]; + this.coins = arguments[4] this.started = false; this.counter = 0; @@ -115,7 +115,7 @@ ReplayCamera.prototype.nextEvent = function() { if (this.event.type == 'camera') { this.move(this.event); } else if (this.event.type == 'coin') { - coins[this.event.id].get(); + this.coins[this.event.id].get(); // Wait a little before launching nextEvent (function(self) { setTimeout(function() { diff --git a/js/prototype/replay.js b/js/prototype/replay.js index aca198d..14cf824 100644 --- a/js/prototype/replay.js +++ b/js/prototype/replay.js @@ -66,7 +66,7 @@ function init() { container.appendChild(renderer.domElement); // Initialize pointer camera - var camera1 = new ReplayCamera(50, container_size.width() / container_size.height(), 0.01, 100000); + var camera1 = new ReplayCamera(50, container_size.width() / container_size.height(), 0.01, 100000, coins); cameras = initBobomb(camera1, scene, static_path, coins); camera1.cameras = cameras;