Skip to content

Commit

Permalink
Fixing positioning of bullet/befender
Browse files Browse the repository at this point in the history
  • Loading branch information
tracend committed May 24, 2012
1 parent a38a765 commit 803c868
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion public/assets/js/objects/bullet.js
Expand Up @@ -34,7 +34,7 @@ Bullet = {

create : function( x ) {
this.x = x;
this.y = SCREEN["height"]-1.5*SPRITE["height"];
this.y = SCREEN["height"]-1.5*(SPRITE["height"]+SPRITE["padding"].y);
this.active = true;
},

Expand Down
4 changes: 2 additions & 2 deletions public/assets/js/objects/defender.js
Expand Up @@ -2,7 +2,7 @@ Defender = function(){

return $.extend({}, (new User()), {

y : SCREEN["height"] - (SPRITE["height"]+SPRITE["padding"].y),
y : Math.floor( SCREEN["height"] - (SPRITE["height"]+SPRITE["padding"].y) ),
canShoot: true,
bullet : null,
style: SPRITE["styles"].defender,
Expand Down Expand Up @@ -61,7 +61,7 @@ return $.extend({}, (new User()), {

coords : function() {
this.x = ( this.pos.x > -1 ) ? Math.floor( this.pos.x * ( SPRITE["width"] + 2*SPRITE["padding"].x ) + SPRITE["padding"].x ): 0;
//this.y = Math.floor( this.pos.y * SPRITE_HEIGHT);
this.y = Math.floor( SCREEN["height"] - (SPRITE["height"]+SPRITE["padding"].y) );
}

});
Expand Down

0 comments on commit 803c868

Please sign in to comment.