-- 轮盘方法
self._index = 1
-- 创建物品
self._list = HUI:Create_Turn(self._ui.Use, '1#2|2#1|1#3|1#4|1#5|1#6|1#7|1#8|1#9|1#10|1#7|1#8', 4, 60, 20, 10) or {}
-- 点击开始摇奖
local click = function (sender)
if self.waTing then
SL:ShowSystemTips('摇奖中...')
return
end
self.waTing = true
self.turnController = HUI:Click_Turn(
sender,
self._list,
self._index,
function()
self:sendMsgToServer('test')
end,
function()
self.waTing = false
end,
0.2,
2
)
end
GUI:addOnClickEvent(self._ui.Button, click)
function c:OnMsg(key, params)
-- 返回得奖数据
if key == 'test'then
if self.turnController then
self.turnController.setTarget(params.id)
self._index = params.id
end
end
end