...)
that.checkJump = function() {
if (that.Y > height*0.4) {
//if player is under about half of the screen - let him move
that.setPosition(that.X, that.Y - that.jumpSpeed);
} else {
//in other dont move player up, move platforms and circles down instead
MoveCircles(that.jumpSpeed * 0.5);
//clouds are in the background, further than platforms and player, so we will move it with half speed
platforms.forEach(function(platform, ind){
platform.y += that.jumpSpeed;
if (platform.y > height) {
//if platform moves outside the screen, we will generate another one on the top
var type = ~~(Math.random() * 5);
if (type == 0)
type = 1;
else
type = 0;
platforms[ind] = new Platform(Math.random() * (width - platformWidth), platform.y - height, type);
}
});
}
that.jumpSpeed--;
if (that.jumpSpeed == 0) {
that.isJumping = false;
that.isFalling = true;
that.fallSpeed = 1;
}
}
Wednesday, May 4, 2011
Saturday, April 2, 2011
May LEGO Brand Store Calender
Seems that this has showed up on Brickset.
Looks like we will get Alien Conquest right before my Birthday! See Brickset for back image.
Monday, March 28, 2011
Subscribe to:
Posts (Atom)