SteveMavic Posted August 7, 2016 Share Posted August 7, 2016 Hello, I've tried to make spritesheet but Phaser doesn't recognized that my image has frames. Phaser thinks, that my image has just one frame. When I try to make animation, it's looks like this Code in gif zyla_zlota = game.add.sprite(800, game.world.height - 120, 'ZylaZlota'); zyla_zlota.animations.add('left', [3, 2, 1, 0], 5, true); //game.physics.arcade.enable(zyla_zlota); zyla_zlota.animations.play('left'); Declaration this.game.load.spritesheet('ZylaZlota', 'assets/images/ŻyłaZłotaFull.gif', 358, 85, 6); Link to comment Share on other sites More sharing options...
rich Posted August 7, 2016 Share Posted August 7, 2016 Impossible to tell without you posting the image you're using. However I see that it's a gif file. That will still work, as long as it's a proper sprite sheet (each frame next to one another), and not an animated gif. You can't use animated gifs in Phaser / Pixi games. Link to comment Share on other sites More sharing options...
SteveMavic Posted August 7, 2016 Author Share Posted August 7, 2016 It's a gif format but it's normal picture and I want to say that I'm dumb, because 358px is a full width of picture, in that case ~60px per frame, so It should be this.game.load.spritesheet('ZylaZlota', 'assets/images/ŻyłaZłotaFull.gif', 60, 85, 6); Sorry for making dumb question. Topic can be closed. Link to comment Share on other sites More sharing options...
Recommended Posts