onUpdate rate different for main game and spawned elements

21 views
Skip to first unread message

phas...@zehnergroup.com

unread,
Apr 9, 2015, 1:17:01 PM4/9/15
to fla...@googlegroups.com
I have a game that has a main onUpdate that moves a background image down the game screen. I create random objects(bad guys) that each have it's own UI component to move them down the screen too.

The issue I'm having is the bad guys are moving down the screen faster then the background even though they're both set to increase the same distance(which makes it seem as if the bad guys onUpdate is called more frequently then the main games onUpdate.

Is there a way to sync these two onUpdates so they move at the same rate?

Mark Knol

unread,
Apr 9, 2015, 6:06:43 PM4/9/15
to fla...@googlegroups.com
How does the code look in the onUpdate function? Does it take the deltatime in account?
Reply all
Reply to author
Forward
0 new messages