Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- define("Holoboy", ['Controllable'],
- function( Controllable ) {
- var Holoboy = function (x, y){
- this._speed = 250;
- this._gravity = 350;
- this._jump = 250;
- this.sprite = this.game.add.sprite(x, y, 'holoboy');
- this.sprite.anchor.x = 0.5;
- this.sprite.body.gravity.y = this._gravity;
- this.sprite.body.collideWorldBounds = true;
- this.sprite.body.allowGravity = false;
- this.sprite.animations.add('idle', [0,2,2,2,0,0,3,4,5,6,7,8,3,4,5,6,7,8,3,4,5,6,7,8,9,9,10,11,12,12,13,13,14,15,15,15,0,0,0,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36], 16, true);
- this.sprite.animations.add('run', [3,4,5,6,7,8], 12, true);
- // initialise jump and release events
- this.initOtherEvents();
- }
- Holoboy.prototype = new Controllable();
- return Holoboy;
- }
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement