Showing the changes to examples/spaceInvadersExample.js (1 of 25 files). Show all
Unified · Split
| @@ -84,13 +84,13 @@ var missileFired = false; · 83 unmodified lines | |||
| 84 | var myMissile; | 84 | var myMissile; |
| 85 | 85 | ||
| 86 | // sounds | 86 | // sounds |
| 87 | var hitSound = new Sound(HIFI_PUBLIC_BUCKET + "sounds/Space%20Invaders/hit.raw"); | 87 | var hitSound = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Space%20Invaders/hit.raw"); |
| 88 | var shootSound = new Sound(HIFI_PUBLIC_BUCKET + "sounds/Space%20Invaders/shoot.raw"); | 88 | var shootSound = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Space%20Invaders/shoot.raw"); |
| 89 | var moveSounds = new Array(); | 89 | var moveSounds = new Array(); |
| 90 | moveSounds[0] = new Sound(HIFI_PUBLIC_BUCKET + "sounds/Space%20Invaders/Lo1.raw"); | 90 | moveSounds[0] = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Space%20Invaders/Lo1.raw"); |
| 91 | moveSounds[1] = new Sound(HIFI_PUBLIC_BUCKET + "sounds/Space%20Invaders/Lo2.raw"); | 91 | moveSounds[1] = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Space%20Invaders/Lo2.raw"); |
| 92 | moveSounds[2] = new Sound(HIFI_PUBLIC_BUCKET + "sounds/Space%20Invaders/Lo3.raw"); | 92 | moveSounds[2] = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Space%20Invaders/Lo3.raw"); |
| 93 | moveSounds[3] = new Sound(HIFI_PUBLIC_BUCKET + "sounds/Space%20Invaders/Lo4.raw"); | 93 | moveSounds[3] = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Space%20Invaders/Lo4.raw"); |
| 94 | var currentMoveSound = 0; | 94 | var currentMoveSound = 0; |
| 95 | var numberOfSounds = 4; | 95 | var numberOfSounds = 4; |
| 96 | var stepsPerSound = invaderStepsPerCycle / numberOfSounds; | 96 | var stepsPerSound = invaderStepsPerCycle / numberOfSounds; |