您的位置:首页 > 其它

根据生日得到星座

2016-12-20 16:04 162 查看
--得到星座
function DataCenter_Setting:GetConstellation(month, day)
local dataInfo = {121, 220, 321, 421, 522, 622, 723, 824, 924, 1024, 1123, 1222}
local Constellations = {"水瓶", "双鱼", "白羊", "金牛", "双子", "巨蟹", "狮子", "处女", "天秤", "天蝎", "射手", "摩羯"}

local birth = 100*month+date;
for i=12, 1, -1 do
if birth > dataInfo[i] then
return Constellations[i]
end
end

return "摩羯"
end
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: