Changeset 129 for pycodeshooter/trunk/shooter
- Timestamp:
- 01/23/12 23:27:51 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.