2014年10月15日

【Lua】使用随机数(转)

摘要: 游戏中创建角色有个随机取名功能,用到了随机数,网上找了篇在lua中使用随机数的文章,mark一下。Lua 生成随机数需要用到两个函数:math.randomseed(xx), math.random([n [, m]])1. math.randomseed(n) 接收一个整数 n 作为随机序列种子。... 阅读全文

posted @ 2014-10-15 17:12 Mayday_Ly 阅读(753) 评论(0) 推荐(0) 编辑

导航