Jump to content

Phaser does not recognize spritesheet


SteveMavic
 Share

Recommended Posts

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
fEjvxoq.gif

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

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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