Sign in to follow this  
Nikow

'Speed' of spriteSheet Animations ?

Recommended Posts

Hi, i need more informations about speed property of animations..

 

I did this :

bike.animations.add('pedale',[0,1,2,3,4,5,6,7,8,9,10,11,12,13]);bike.animations.play('pedale',0,true,false)bike.animations.speed = 10;

But the animation didn't play at 10 frames per seconds ....?

 

So What's wrong with my code and what is the good way to use it ?

 

Thanks all :)

Share this post


Link to post
Share on other sites

You're trying to set the "speed" property for the AnimationManager, not the animation itself. AnimationManager doesn't have a "speed" property, it won't do anything with it.

 

You can access your pedale animation through

bike.animations._anims['pedale']

or

bike.animations._anims.pedale

You should be able to set the speed there.

 

You can set your frameRate when you call add, if you know the speed you want to play it at in advance.

Share this post


Link to post
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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.