level 1
ghostweo
楼主
网游九阴的插件lua模块下有这样一段代码
local main_player = nx_GetMPlayerID()
val=nx_QueryProp(main_player, "RoleStormRatio")
local lbl_id = nx_EntMethod(form_id,"Find","lbl_player_storm")
if nx_IsValid(lbl_id) then
local nq="怒"..tostring(stormcur)
nx_SetProp(lbl_id,"Text",nx_ToWideStr(nq))
end
作用是在一个已有的Label 上更新key值"text"
nx_ 开头 那些应该是他自己定义的method把。而在这里key "RoleStromRatio"是key名把?
那么这里main_player会是个table吗?
能用什么方法遍历出其key名吗?
如果我的概念有误,这个东西应该怎么理解,看什么资料呢?
2015年12月11日 17点12分
1
local main_player = nx_GetMPlayerID()
val=nx_QueryProp(main_player, "RoleStormRatio")
local lbl_id = nx_EntMethod(form_id,"Find","lbl_player_storm")
if nx_IsValid(lbl_id) then
local nq="怒"..tostring(stormcur)
nx_SetProp(lbl_id,"Text",nx_ToWideStr(nq))
end
作用是在一个已有的Label 上更新key值"text"
nx_ 开头 那些应该是他自己定义的method把。而在这里key "RoleStromRatio"是key名把?
那么这里main_player会是个table吗?
能用什么方法遍历出其key名吗?
如果我的概念有误,这个东西应该怎么理解,看什么资料呢?