Can I generate Some enemies from different positions every time when the game Starts?
How can I generate enemies from different positions on every time the games starts in corona . . . Any one can guide me 开发者_开发百科...? Thanks
I assume you know how to create random numbers in Corona, and your problem is that the same ones keep appearing each time you run your program. The solution you're looking for is:
math.randomseed(os.time())
That will ensure a different result each time.
- math.random
- math.randomseed
- os.time
精彩评论