home *** CD-ROM | disk | FTP | other *** search
- function playerHitsLand(whereHit)
- {
- player.playerHitClip.gotoAndPlay(2);
- wallDamage = 1;
- reduceScore();
- damageSnd.start();
- playerYspeed = 0;
- if(whereHit == "left")
- {
- px += 10;
- playerHealth -= wallDamage;
- }
- if(whereHit == "right")
- {
- px -= 5;
- playerHealth -= wallDamage;
- }
- if(whereHit == "bottom")
- {
- py -= 10;
- addThrust = 2;
- playerHealth -= wallDamage;
- }
- if(whereHit == "top")
- {
- py += 10;
- addThrust = 0;
- playerYspeed = 0.5;
- playerHealth -= wallDamage;
- }
- testiflifelost();
- }
-