梭哈显示分
parent
54c9c76737
commit
c15e55477a
|
|
@ -6,11 +6,50 @@ function FamilyNumberRecord.New(root)
|
||||||
setmetatable(M, { __index = root })
|
setmetatable(M, { __index = root })
|
||||||
local self = setmetatable({}, { __index = M })
|
local self = setmetatable({}, { __index = M })
|
||||||
|
|
||||||
|
-- print("lingmengFamilyNumberRecord")
|
||||||
|
-- for key, value in pairs(self._group) do
|
||||||
|
-- if type(value) == "table" then
|
||||||
|
-- print(key)
|
||||||
|
-- pt(value)
|
||||||
|
-- else
|
||||||
|
-- print(key .. ":" .. tostring(value))
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
self.familyType.selectedIndex = 5
|
self.familyType.selectedIndex = 5
|
||||||
self.lastType = 1
|
self.lastType = 1
|
||||||
|
|
||||||
self._view:getchild('text_titleRecord')
|
self._view:GetChild('text_titleRecord').text = string.format("%s(%s) 成员记录", self._group.name, self._group.id)
|
||||||
|
self._view:GetChild('text_residueDiamond').text = self._group.diamo
|
||||||
|
self._view:GetChild('text_timeRecord').visible = false
|
||||||
|
|
||||||
|
self._input_IDSerach = self._view:GetChild('input_numberID')
|
||||||
|
|
||||||
|
self._view:GetChild('btn_clearInput').onClick:Set(function()
|
||||||
|
self._input_IDSerach.text = ""
|
||||||
|
end)
|
||||||
|
self._view:GetChild('btn_searchRecord').onClick:Set(function()
|
||||||
|
ViewUtil.ShowOneChooose("该功能还未开放")
|
||||||
|
end)
|
||||||
|
self._view:GetChild('btn_changeMJScore').onClick:Set(function()
|
||||||
|
ViewUtil.ShowOneChooose("该功能还未开放")
|
||||||
|
end)
|
||||||
|
|
||||||
|
self._view:GetChild('btn_changePKScore').onClick:Set(function()
|
||||||
|
ViewUtil.ShowOneChooose("该功能还未开放")
|
||||||
|
end)
|
||||||
|
self._view:GetChild('comp_sortTypeList'):GetChild('n0').onClickItem:Set(function(context)
|
||||||
|
self:OnClickSortType(context)
|
||||||
|
end)
|
||||||
|
self._view:GetChild('comp_gameTypeList'):GetChild('n0').onClickItem:Set(function(context)
|
||||||
|
self:OnClickSortType(context)
|
||||||
|
end)
|
||||||
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function M:OnClickSortType(context)
|
||||||
|
print("lingmengOnClickSortType", context.data.title, context.data.text)
|
||||||
|
pt(getmetatable(context.data.data))
|
||||||
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,7 @@ function ShareScreenShot(n, callback)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
function shareQRCodePicture(url,secene)
|
function shareQRCodePicture(url, secene)
|
||||||
--print(debug.traceback())
|
--print(debug.traceback())
|
||||||
print(url)
|
print(url)
|
||||||
print(secene)
|
print(secene)
|
||||||
|
|
@ -171,15 +171,15 @@ function shareQRCodePicture(url,secene)
|
||||||
local json_str = json.encode(json_data)
|
local json_str = json.encode(json_data)
|
||||||
pt(json_str)
|
pt(json_str)
|
||||||
local tex2 = QRCodePicture.GenerateQRcode(url, 250, 250)
|
local tex2 = QRCodePicture.GenerateQRcode(url, 250, 250)
|
||||||
local tex1 = ResourcesManager.LoadObject("base/lobby/bg/bg.png",typeof(UnityEngine.Texture2D))
|
local tex1 = ResourcesManager.LoadObject("base/lobby/bg/bg.png", typeof(UnityEngine.Texture2D))
|
||||||
filename = filename ..".jpg"
|
filename = filename .. ".jpg"
|
||||||
print("text2==========")
|
print("text2==========")
|
||||||
print(tex2)
|
print(tex2)
|
||||||
print("text1==========")
|
print("text1==========")
|
||||||
print(tex1)
|
print(tex1)
|
||||||
print("filename==========")
|
print("filename==========")
|
||||||
print(filename)
|
print(filename)
|
||||||
QRCodePicture.CombanitePicture(tex1,tex2,393,1334-802-250,filename)
|
QRCodePicture.CombanitePicture(tex1, tex2, 393, 1334 - 802 - 250, filename)
|
||||||
|
|
||||||
GameApplication.Instance:ShareLink(1, json_str, nil)
|
GameApplication.Instance:ShareLink(1, json_str, nil)
|
||||||
end
|
end
|
||||||
|
|
@ -201,7 +201,7 @@ local bg_url = nil
|
||||||
function LoadGameBg(url, main_view)
|
function LoadGameBg(url, main_view)
|
||||||
local win_mode = main_view:GetChild("win_mode")
|
local win_mode = main_view:GetChild("win_mode")
|
||||||
win_mode:RemoveChildren(0, -1, true)
|
win_mode:RemoveChildren(0, -1, true)
|
||||||
local tex_bg = ResourcesManager.LoadObjectByGroup(url..".png",typeof(UnityEngine.Texture), url)
|
local tex_bg = ResourcesManager.LoadObjectByGroup(url .. ".png", typeof(UnityEngine.Texture), url)
|
||||||
local bg = GImage()
|
local bg = GImage()
|
||||||
bg.texture = FairyGUI.NTexture(tex_bg)
|
bg.texture = FairyGUI.NTexture(tex_bg)
|
||||||
bg.width = win_mode.width
|
bg.width = win_mode.width
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ function M:RegisterEvt()
|
||||||
self._eventmap[EXProtocol.GAME_EVT_PLAYER_DEAL] = self.OnSendCard
|
self._eventmap[EXProtocol.GAME_EVT_PLAYER_DEAL] = self.OnSendCard
|
||||||
self._eventmap[EXProtocol.GAME_EVT_RESULT1] = self.OnResult1
|
self._eventmap[EXProtocol.GAME_EVT_RESULT1] = self.OnResult1
|
||||||
self._eventmap[EXProtocol.GAME_EVT_RESULT2] = self.OnResult2
|
self._eventmap[EXProtocol.GAME_EVT_RESULT2] = self.OnResult2
|
||||||
|
self._eventmap[EXProtocol.GAME_EVT_SCORE] = self.OnUpdateScore
|
||||||
self._eventmap[EXProtocol.GAME_EVT_CHANGE_ACTIVE_PLAYER] = self.OnTurnAction
|
self._eventmap[EXProtocol.GAME_EVT_CHANGE_ACTIVE_PLAYER] = self.OnTurnAction
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -117,6 +118,14 @@ function M:OnResult2(evt_data)
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function M:OnUpdateScore(evt_data)
|
||||||
|
self._cacheEvent:Enqueue(
|
||||||
|
function()
|
||||||
|
DispatchEvent(self._dispatcher, EXGameEvent.OnUpdateScore, evt_data)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
function M:OnTurnAction(evt_data)
|
function M:OnTurnAction(evt_data)
|
||||||
self._cacheEvent:Enqueue(
|
self._cacheEvent:Enqueue(
|
||||||
function()
|
function()
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ local EXGameEvent = {
|
||||||
OnTipAction = "OnTipAction",
|
OnTipAction = "OnTipAction",
|
||||||
OnResult1 = "OnResult1",
|
OnResult1 = "OnResult1",
|
||||||
OnResult2 = "OnResult2",
|
OnResult2 = "OnResult2",
|
||||||
|
OnUpdateScore = "OnUpdateScore",
|
||||||
OnTurnAction = "OnTurnAction"
|
OnTurnAction = "OnTurnAction"
|
||||||
}
|
}
|
||||||
return EXGameEvent
|
return EXGameEvent
|
||||||
|
|
|
||||||
|
|
@ -213,6 +213,9 @@ function M:InitView(url)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
----------------------------------------------------
|
----------------------------------------------------
|
||||||
|
-------------梭哈-------------------
|
||||||
|
self._viewText_allScore = self._view:GetChild('text_AllScore')
|
||||||
|
------------------------------------
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:UpdateCard(index)
|
function M:UpdateCard(index)
|
||||||
|
|
@ -333,6 +336,22 @@ function M:EventInit()
|
||||||
local arg = { ... }
|
local arg = { ... }
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
_gamectr:AddEventListener(EXGameEvent.OnUpdateScore, function(...)
|
||||||
|
local arg = { ... }
|
||||||
|
local data = arg[1]
|
||||||
|
local sidePot = data.sidePot
|
||||||
|
self._viewText_allScore.text = sidePot
|
||||||
|
local maxPeopleNum = _room.room_config.people_num
|
||||||
|
for i = 1, maxPeopleNum do
|
||||||
|
local score = data[string.format("seat_%d", i)]
|
||||||
|
print(score)
|
||||||
|
local player = _player_info[self:GetPos(i)]
|
||||||
|
if score then
|
||||||
|
player:UpdateScore(score)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
_gamectr:AddEventListener(EXGameEvent.OnTurnAction, function(...)
|
_gamectr:AddEventListener(EXGameEvent.OnTurnAction, function(...)
|
||||||
print("lingmengOnTurnAction")
|
print("lingmengOnTurnAction")
|
||||||
pt(arg)
|
pt(arg)
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,9 @@ local EXProtocol = {
|
||||||
-- 大结算
|
-- 大结算
|
||||||
GAME_EVT_RESULT2 = "2008",
|
GAME_EVT_RESULT2 = "2008",
|
||||||
|
|
||||||
|
-- 分数记录协议
|
||||||
|
GAME_EVT_SCORE = "2011",
|
||||||
|
|
||||||
-- 转盘指向事件
|
-- 转盘指向事件
|
||||||
GAME_EVT_CHANGE_ACTIVE_PLAYER = "2099",
|
GAME_EVT_CHANGE_ACTIVE_PLAYER = "2099",
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue