开发者

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜