khleug35 Posted January 13, 2018 Share Posted January 13, 2018 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 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 More sharing options...
samme Posted January 13, 2018 Share Posted January 13, 2018 Use an atlas. Link to comment Share on other sites More sharing options...
Santiago Posted January 13, 2018 Share Posted January 13, 2018 Like Samme said, using spritesheet every frame must be the same size, what you want to do requires an atlas. Link to comment Share on other sites More sharing options...
Recommended Posts