speed on a sprite vs a clock timer

0 views
Skip to first unread message

Kevin Moran

unread,
Feb 9, 2012, 12:43:32 AM2/9/12
to android-progr...@googlegroups.com
Is a sprite speed a replacement for a clock timer? I saw in a previous email that you use either/or. But if I'm using speed, how do I do it? simply setting speed to some value doesn't do anything.

Kevin

David W Wolber

unread,
Feb 9, 2012, 12:56:11 AM2/9/12
to android-progr...@googlegroups.com
Yes, each image sprite can work with its own timer.

Make sure to call imageSprite.Initialize() and set the speed to something. You can also set the interval, so its speed in pixels and interval in milliseconds. I think the default interval is 1000, but speed  0.

Dave
Reply all
Reply to author
Forward
0 new messages