Created
January 24, 2015 12:11
-
-
Save xeBuz/ed47199943433f4eb090 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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