开发者

Can I generate Some enemies from different positions every time when the game Starts?

开发者 https://www.devze.com 2023-03-22 18:34 出处:网络
How can I generate enemies from different positions on every time the games starts in corona . . . Any one can guide me 开发者_开发百科...? ThanksI assume you know how to create random numbers in Coro

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

精彩评论

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