Sign in to follow this  
khleug35

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

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. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.