Jump to content

How to get the Sprites that is different position and size on Spritesheet


khleug35
 Share

Recommended Posts

How to get the Sprites that is different position and size on Spritesheet??  Thx

I want to get this "the Biggest dude" on this image use phaser and without use scale method

 

dude.png.3b8cd8d9286e8c877e262832c4cd39d3.png

 

dude2.png.8f928676929bed83dc5be061776a9dc0.png

 

function preload() {
game.load.spritesheet('dude', 'assets/dude.png',32,48);
}

function create() {
player = game.add.sprite(100, 200, 'dude');
player.animations.add('left', [0, 1, 2, 3], 10, true);
player.animations.add('right', [5, 6, 7, 8], 10, true);

//the dude become bigger, but I have no idea how to set it
player.animations.add('Big', [?????], 10, true);
}

function update() {
  player.animations.play('Big'); 
}

 

I want to get this "the Biggest dude" in the image bottom, it width is 72 and height is 72,  Thanks you very much. 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...