Skip to content

Commit

Permalink
make it work in firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
clkao committed May 7, 2010
1 parent 78c2ec8 commit 7be6eb7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions public/js/xdfighter.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ $(function(){


//hit? //hit?
if( cvsLeft + cvsF.animations[cvsF.currentState].width - 2 > aboboLeft ){ if( cvsLeft + cvsF.animations[cvsF.currentState].width - 2 > aboboLeft ){
console.log( 'role overlay' ); // console.log( 'role overlay' );


if((cvsF.currentState == KICK || cvsF.currentState == PUNCH) && aboboF.currentState != BEATEN){ if((cvsF.currentState == KICK || cvsF.currentState == PUNCH) && aboboF.currentState != BEATEN){


Expand All @@ -226,7 +226,7 @@ $(function(){
changeAnimation(abobo, aboboF.animations, BEATEN, aboboF.currentState); changeAnimation(abobo, aboboF.animations, BEATEN, aboboF.currentState);
aboboF.currentState = BEATEN; aboboF.currentState = BEATEN;


console.log( 'abobo is beaten.' ); // console.log( 'abobo is beaten.' );


if ( cvsF.currentState == KICK ) { if ( cvsF.currentState == KICK ) {
abobo.reduceLife( 10 ); abobo.reduceLife( 10 );
Expand All @@ -246,7 +246,7 @@ $(function(){
} }
} }
else if ((aboboF.currentState == KICK || aboboF.currentState == PUNCH) && cvsF.currentState != BEATEN) { else if ((aboboF.currentState == KICK || aboboF.currentState == PUNCH) && cvsF.currentState != BEATEN) {
console.log( 'cvs is beaten.' ); // console.log( 'cvs is beaten.' );
changeAnimation(cvs, cvsF.animations, BEATEN, cvsF.currentState); changeAnimation(cvs, cvsF.animations, BEATEN, cvsF.currentState);
cvsF.currentState = BEATEN; cvsF.currentState = BEATEN;


Expand Down Expand Up @@ -331,7 +331,7 @@ $(function(){
function fire_tomato() { function fire_tomato() {
var cvsLeft = cvs.position().left; var cvsLeft = cvs.position().left;
if ($('#po').length) if ($('#po').length)
break; return;
$("#fighters").addSprite( $("#fighters").addSprite(
"po", "po",
{ {
Expand Down

0 comments on commit 7be6eb7

Please sign in to comment.