function myModule.GetTrueRandom(min,max)
--得到时间字符串
local strTime=tostring(os.time())
--得到一个反转字符串
local strRev=string.reverse(strTime)
--得到前6位
local strRandomTime=string.sub(strRev, 1, 6)
--设置时间种子
math.randomseed(strRandomTime)
--输出随机数
--print("#随机数=",math.random(min, max))
return math.random(min, max)
end
07-06
1325
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交