want to know if is it possible to use single timer or scheduler method for multiple sprites ? Like I am now working on a game and there could be any number of sprites and i want to perform some actions on all of that sprites, So do I have to use as many timers or schedulers as sprites ? Or How can the job be done using only a single timer or scheduler ? What is I schedule a method and use it for, Say 10 sprites ? Will it affect the performance..?
Usually you'll just create one scheduler that calls the
This gives you much better control about the flow of your code. You'll be able to run the physics-simulation first and then iterate through all bodies/sprites and update their position.
Having all entities within a data-structure also gives you greater control about when/how entities will be added and removed from updates as well as better means of debugging (scheduled updates can be cumbersome to debug if you have lots of sprites).