Changeset 129 for pycodeshooter/trunk
- Timestamp:
- 01/23/12 23:27:51 (13 years ago)
- Location:
- pycodeshooter/trunk
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pycodeshooter/trunk/index.html
r128 r129 42 42 registerSound("se_start", document.getElementById("se_start")); 43 43 registerSound("se_encounter", document.getElementById("se_encounter")); 44 registerSound("se_damage_enemy", document.getElementById("se_damage_enemy")); 45 registerSound("se_damage_player", document.getElementById("se_damage_player")); 44 registerSound("se_damage", document.getElementById("se_damage")); 46 45 registerSound("se_bomb", document.getElementById("se_bomb")); 47 46 registerSound("se_destroy", document.getElementById("se_destroy")); … … 170 169 <audio src="sounds/se_coinin_1.ogg", id="se_start" preload="auto" /> 171 170 <audio src="sounds/se_denshion_1.ogg", id="se_encounter" preload="auto" /> 172 <audio src="sounds/se_pyuun.ogg", id="se_damage_player" preload="auto" /> 173 <audio src="sounds/se_click_2.ogg", id="se_damage_enemy" preload="auto" /> 171 <audio src="sounds/se_click_2.ogg", id="se_damage" preload="auto" /> 174 172 <audio src="sounds/se_zusyunzusyun.ogg", id="se_bomb" preload="auto" /> 175 173 <audio src="sounds/se_zugan.ogg", id="se_destroy" preload="auto" /> -
pycodeshooter/trunk/shooter/system.js
r126 r129 188 188 189 189 if (enemy.isDead()) { 190 playSound("se_destroy");191 192 addDeathPieces(193 enemy.x, enemy.y,194 [6, 8, 10], ["#55F", "#AAF"], 3, 8195 );196 197 190 if (System.score[trooper.name] !== undefined) { 198 191 System.score[trooper.name] += enemy.maxLife * 100; … … 353 346 brrgs 354 347 ); 355 enemy.registerCallback("damaged", function() {playSound("se_damage_enemy")}); 348 349 enemy.registerCallback("damaged", function() { 350 if (enemy.isDead()) { 351 playSound("se_destroy"); 352 353 addDeathPieces( 354 enemy.x, enemy.y, 355 [6, 8, 10], ["#F55", "#FAA"], 3, 8 356 ); 357 } 358 else { 359 playSound("se_damage"); 360 } 361 }); 356 362 357 363 System.enemies.push(enemy); … … 533 539 -0.5)] 534 540 ); 535 trooper.registerCallback("addBomb", function(){playSound("se_bomb")}); 536 trooper.registerCallback("damaged", function(){playSound("se_damage_player")}); 541 trooper.registerCallback("addBomb", function() { playSound("se_bomb"); }); 542 trooper.registerCallback("damaged", function() { 543 playSound("se_destroy"); 544 545 addDeathPieces( 546 trooper.x, trooper.y, 547 [6, 8, 10], ["#55F", "#AAF"], 3, 8 548 ); 549 550 for (var i = 0; i < System.enemies.length; i++) { 551 System.enemies[i].clearBullet(); 552 } 553 554 trooper.x = System.screen.width / 2; 555 trooper.y = System.screen.height - System.screen.height / 7; 556 }); 537 557 538 558 System.players.push(trooper);
Note: See TracChangeset
for help on using the changeset viewer.