Skip to content

Instantly share code, notes, and snippets.

@xeBuz
Created January 24, 2015 12:11
Show Gist options
  • Save xeBuz/ed47199943433f4eb090 to your computer and use it in GitHub Desktop.
Save xeBuz/ed47199943433f4eb090 to your computer and use it in GitHub Desktop.
var PlayerGravity = function (game, x, y) {
this.game = game;
this.speed = 5;
Phaser.Sprite.call(this, this.game, this.game.world.randomX, 10, 'chocobo');
game.physics.enable( [ this ], Phaser.Physics.ARCADE);
this.body.collideWorldBounds = true;
this.body.bounce.y = 0.8;
};
PlayerGravity.prototype = Object.create(Phaser.Sprite.prototype);
PlayerGravity.prototype.constructor = PlayerGravity;
PlayerGravity.prototype.update = function() {
};
module.exports = PlayerGravity;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment