Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( this.vMotion == DO_JUMP )
- {
- if ( this.canStartJump && this.onGround && this.isTouching( FlxObject.DOWN ) )
- {
- this.canStartJump = false;
- this.canJump = true;
- this.velocity.y = 0;
- this.sounds[ "jump001" ].play();
- }
- if ( this.canJump )
- {
- this.velocity.y -= this.maxVelocity.y / 16;
- if ( this.velocity.y < -( this.maxVelocity.y / 2.3 ) )
- {
- this.canJump = false;
- }
- }
- }
- else
- {
- this.canStartJump = true;
- this.canJump = false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement