Corrected bug with coins and replay
This commit is contained in:
		
							parent
							
								
									a0ad86cd19
								
							
						
					
					
						commit
						cceae6af04
					
				
							
								
								
									
										4
									
								
								js/prototype/ReplayCamera.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								js/prototype/ReplayCamera.js
									
									
									
									
										vendored
									
									
								
							| @ -2,7 +2,7 @@ | |||||||
| var ReplayCamera = function() { | var ReplayCamera = function() { | ||||||
|     THREE.PerspectiveCamera.apply(this, arguments); |     THREE.PerspectiveCamera.apply(this, arguments); | ||||||
| 
 | 
 | ||||||
|     this.cameras = arguments[4]; |     this.coins = arguments[4] | ||||||
| 
 | 
 | ||||||
|     this.started = false; |     this.started = false; | ||||||
|     this.counter = 0; |     this.counter = 0; | ||||||
| @ -115,7 +115,7 @@ ReplayCamera.prototype.nextEvent = function() { | |||||||
|     if (this.event.type == 'camera') { |     if (this.event.type == 'camera') { | ||||||
|         this.move(this.event); |         this.move(this.event); | ||||||
|     } else if (this.event.type == 'coin') { |     } else if (this.event.type == 'coin') { | ||||||
|         coins[this.event.id].get(); |         this.coins[this.event.id].get(); | ||||||
|         // Wait a little before launching nextEvent
 |         // Wait a little before launching nextEvent
 | ||||||
|         (function(self) { |         (function(self) { | ||||||
|             setTimeout(function() { |             setTimeout(function() { | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								js/prototype/replay.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								js/prototype/replay.js
									
									
									
									
										vendored
									
									
								
							| @ -66,7 +66,7 @@ function init() { | |||||||
|     container.appendChild(renderer.domElement); |     container.appendChild(renderer.domElement); | ||||||
| 
 | 
 | ||||||
|     // Initialize pointer camera
 |     // 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); |     cameras = initBobomb(camera1, scene, static_path, coins); | ||||||
|     camera1.cameras = cameras; |     camera1.cameras = cameras; | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user