pinkpanther Posted July 14, 2014 Share Posted July 14, 2014 Hi, I got my sprite in separate PNG files. I want these frames to be displayed conditionally, e.g. sprite moving left - the left skew, moving right - right skew. Sometimes I want the sprite to animate (e.g. steps). Whoat should I do? Regards :-) Quote Link to comment Share on other sites More sharing options...
enpu Posted July 14, 2014 Share Posted July 14, 2014 var sprite = new game.Sprite('sprite01.png'); Change sprite texture with: sprite.setTexture('sprite02.png'); Or use animation: var anim = new game.Animation('sprite01.png, 'sprite02.png', 'sprite03.png');anim.play(); Quote Link to comment Share on other sites More sharing options...
pinkpanther Posted July 14, 2014 Author Share Posted July 14, 2014 Thank you :-) Quote Link to comment Share on other sites More sharing options...
nacs Posted August 6, 2014 Share Posted August 6, 2014 If you don't want to do it manually, you can use the Sequencer plugin someone made:http://www.html5gamedevs.com/topic/4561-sequencer/ I've used it and it works well. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.