同步下注显示分数梭哈
parent
f66be072e8
commit
98a12bdbbc
|
|
@ -1,51 +0,0 @@
|
|||
local PlayerInfoView = require("Game.View.PlayerInfoView_copy")
|
||||
|
||||
local M = {}
|
||||
|
||||
function M.new(view, mainView)
|
||||
setmetatable(M, { __index = PlayerInfoView })
|
||||
local self = setmetatable({}, { __index = M })
|
||||
self._view = view
|
||||
self._main_view = mainView
|
||||
self:init()
|
||||
return self
|
||||
end
|
||||
|
||||
function M:init()
|
||||
PlayerInfoView.init(self)
|
||||
end
|
||||
|
||||
function M:ShowInteraction(type, str)
|
||||
if type == 3 then
|
||||
Voice.DownLoad(str, function(clip)
|
||||
if (clip) then
|
||||
self:ShowMaskVoice(clip.length)
|
||||
GameApplication.Instance:PlayVoice(clip)
|
||||
end
|
||||
end)
|
||||
elseif type == 4 then
|
||||
self:SetChat(str)
|
||||
elseif type == 2 then
|
||||
local chat_index = tonumber(str)
|
||||
self._main_view:PlayChatSound(self._player.self_user.sex, chat_index)
|
||||
local language, index = self._main_view:GetChatMsgLanguage(chat_index)
|
||||
self:SetChat(self._main_view.Fix_Msg_Chat[index])
|
||||
elseif type == 1 then
|
||||
self:SetBiaoqing("ui://Chat/" .. str)
|
||||
end
|
||||
end
|
||||
|
||||
function M:UpdateRemainCard(card_num, hide)
|
||||
if hide then
|
||||
self._view:GetController("show_remain").selectedIndex = 0
|
||||
else
|
||||
self._view:GetController("show_remain").selectedIndex = 1
|
||||
end
|
||||
self._view:GetChild("com_remain"):GetChild("tex_remain").text = card_num
|
||||
end
|
||||
|
||||
function M:FillData(player)
|
||||
PlayerInfoView.FillData(self, player)
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
@ -85,8 +85,9 @@ function M:SendTipQi()
|
|||
_client:send(EXProtocol.GAME_EVT_FOLD, _data)
|
||||
end
|
||||
|
||||
function M:SendTipXia()
|
||||
function M:SendTipXia(score)
|
||||
local _data = {}
|
||||
_data["betScore"] = score
|
||||
local _client = ControllerManager.GameNetClinet
|
||||
_client:send(EXProtocol.GAME_EVT_BET, _data)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -49,18 +49,27 @@ function M:ShowTips(type)
|
|||
self._view_tipsList:RemoveChildren()
|
||||
local obj = self._view_tipsList:AddItemFromPool()
|
||||
self.SetTipData(obj, TipType.qi)
|
||||
local obj = self._view_tipsList:AddItemFromPool()
|
||||
self.SetTipData(obj, TipType.xia)
|
||||
obj = self._view_tipsList:AddItemFromPool()
|
||||
obj.title = "1分"
|
||||
self.SetTipData(obj, TipType.xia, 1)
|
||||
obj = self._view_tipsList:AddItemFromPool()
|
||||
obj.title = "2分"
|
||||
self.SetTipData(obj, TipType.xia, 2)
|
||||
obj = self._view_tipsList:AddItemFromPool()
|
||||
obj.title = "5分"
|
||||
self.SetTipData(obj, TipType.xia, 5)
|
||||
end
|
||||
end
|
||||
|
||||
function M:OnClickTips(context)
|
||||
local type = context.data.data.type
|
||||
local button = context.data.data
|
||||
local type = button.type
|
||||
if type == TipType.guo then
|
||||
elseif type == TipType.qi then
|
||||
self:ClickTipQi()
|
||||
elseif type == TipType.xia then
|
||||
self:ClickTipXia()
|
||||
local score = button.data
|
||||
self:ClickTipXia(score)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -68,13 +77,14 @@ function M:ClickTipQi()
|
|||
self._gameCtr:SendTipQi()
|
||||
end
|
||||
|
||||
function M:ClickTipXia()
|
||||
self._gameCtr:SendTipXia()
|
||||
function M:ClickTipXia(score)
|
||||
self._gameCtr:SendTipXia(score)
|
||||
end
|
||||
|
||||
function M.SetTipData(obj, type)
|
||||
function M.SetTipData(obj, type, ...)
|
||||
obj.data = {}
|
||||
obj.data.type = type
|
||||
obj.data.data = ...
|
||||
obj:GetController('type').selectedIndex = type
|
||||
end
|
||||
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in New Issue