10.14
|
|
@ -4,23 +4,24 @@ local M = DismissRoomWindow
|
|||
|
||||
|
||||
function DismissRoomWindow.new(blur_view)
|
||||
setmetatable(M, {__index = BaseWindow})
|
||||
local self = setmetatable({}, {__index = M})
|
||||
setmetatable(M, { __index = BaseWindow })
|
||||
local self = setmetatable({}, { __index = M })
|
||||
self.class = "DismissRoomWindow"
|
||||
self._currenIndex = 0
|
||||
self._blur_view = blur_view
|
||||
self._animation = false
|
||||
self.onCallback = event("onCallback",true)
|
||||
self.onCallback = event("onCallback", true)
|
||||
self._close_zone = false
|
||||
-- self._queue = false
|
||||
self.time = 180
|
||||
self:init("ui://Common/dismiss_room")
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
function M:init(url)
|
||||
BaseWindow.init(self,url)
|
||||
BaseWindow.init(self, url)
|
||||
local view = self._view
|
||||
-- self._root_view.sortingOrder = 100
|
||||
self.tex_time = view:GetChild("tex_time")
|
||||
self.tex_time2 = view:GetChild("tex_time2")
|
||||
local _btn_aggree = view:GetChild("btn_aggree")
|
||||
|
|
@ -55,13 +56,14 @@ function M:FillData(data)
|
|||
self._view:GetChild("tex_tip").text = string.format("玩家\\[[color=#70401C]%s[/color]]申请解散房间", data.req_p.seat)
|
||||
else
|
||||
--self._view:GetChild("tex_tip").text = string.format("[color=#ff9d02]【%s】[/color]发起了解散房间申请,是否同意?",data.req_p.self_user.nick_name)
|
||||
self._view:GetChild("tex_tip").text = string.format("玩家\\[[color=#70401C]%s[/color]]申请解散房间", data.req_p.self_user.nick_name)
|
||||
self._view:GetChild("tex_tip").text = string.format("玩家\\[[color=#70401C]%s[/color]]申请解散房间",
|
||||
data.req_p.self_user.nick_name)
|
||||
end
|
||||
local ctr_falg = self._view:GetController("falg")
|
||||
local lst_player = self._view:GetChild("lst_player")
|
||||
lst_player:RemoveChildrenToPool()
|
||||
local list = data.list
|
||||
for i=1,#list do
|
||||
for i = 1, #list do
|
||||
local tem = list[i]
|
||||
if tem.player == DataManager.CurrenRoom.self_player then
|
||||
ctr_falg.selectedIndex = tem.result
|
||||
|
|
@ -88,5 +90,4 @@ function M:OnUpdate(deltaTime)
|
|||
self.tex_time2.text = tostring(math.floor(self.time))
|
||||
end
|
||||
|
||||
|
||||
return M
|
||||
|
|
|
|||
|
|
@ -599,6 +599,9 @@ end
|
|||
function M:UpdateFamilyRoom(fgCtr, id)
|
||||
local list_room = self._view:GetChild('list_room')
|
||||
list_room:SetVirtual()
|
||||
local pane = list_room.scrollPane
|
||||
pane.decelerationRate = 0.95 -- 惯性大
|
||||
pane.bouncebackEffect = true
|
||||
local playList = self._group.playList
|
||||
local roomList = self._group.rooms
|
||||
self._view:GetChild('n364').text = string.format("已开启%s桌游戏", #roomList)
|
||||
|
|
|
|||
|
|
@ -52,8 +52,16 @@ function M:init(url)
|
|||
end)
|
||||
|
||||
btn_sound.onClick:Add(function()
|
||||
if btn_sound.selected then
|
||||
local v = GameApplication.Instance.SoundValue
|
||||
slider_sound.value = 0
|
||||
GameApplication.Instance.SoundValue = 0
|
||||
PlayerPrefs.SetInt('sound', v)
|
||||
else
|
||||
local v = PlayerPrefs.GetInt('sound')
|
||||
slider_sound.value = v
|
||||
GameApplication.Instance.SoundValue = v
|
||||
end
|
||||
GameApplication.Instance.SoundMute = btn_sound.selected;
|
||||
end)
|
||||
|
||||
|
|
|
|||
|
|
@ -65,8 +65,9 @@ function M:InitView(url)
|
|||
|
||||
local btn_authenticate = self._view:GetChild("btn_authenticate")
|
||||
btn_authenticate.onClick:Add(handler(self, function()
|
||||
local authenticateView = LobbyAuthenticateView.new()
|
||||
authenticateView:Show()
|
||||
-- local authenticateView = LobbyAuthenticateView.new()
|
||||
-- authenticateView:Show()
|
||||
ViewUtil.ErrorTip(-1, "该功能还会开放,敬请期待")
|
||||
end))
|
||||
|
||||
local btn_notice = self._view:GetChild("btn_notice")
|
||||
|
|
@ -564,7 +565,7 @@ function M:ReconnectRoom(groupId)
|
|||
if response.ReturnCode ~= 0 then
|
||||
ViewUtil.ErrorMsg(self._root_view, response.ReturnCode, '进入房间失败')
|
||||
FamilyView.lastId = groupId
|
||||
ViewManager.ChangeView(ViewManager.View_Family)
|
||||
ViewManager.ChangeView(ViewManager.View_Lobby)
|
||||
return
|
||||
else
|
||||
FamilyView.lastId = groupId
|
||||
|
|
|
|||
|
|
@ -1300,16 +1300,16 @@ function M:Missile(seat, targetSeat, Missile)
|
|||
local url = ""
|
||||
if Missile == "boom" then
|
||||
animUrl = "ui://Main_Majiang/bomb"
|
||||
url = "ui://Common/boom"
|
||||
url = "ui://Common/boom_move"
|
||||
elseif Missile == "egg" then
|
||||
animUrl = "ui://Main_Majiang/egg"
|
||||
url = "ui://Common/egg"
|
||||
url = "ui://Common/egg_move"
|
||||
elseif Missile == "diamo" then
|
||||
animUrl = "ui://Main_Majiang/jiezhi"
|
||||
url = "ui://Common/diamo"
|
||||
url = "ui://Common/diamo_move"
|
||||
elseif Missile == "flower" then
|
||||
animUrl = "ui://Main_Majiang/flower"
|
||||
url = "ui://Common/flower"
|
||||
url = "ui://Common/flower_move"
|
||||
end
|
||||
|
||||
local send = self._player_info[self:GetPos(seat)]
|
||||
|
|
@ -1534,6 +1534,7 @@ function M:Destroy()
|
|||
DSTweenManager.ClearTween()
|
||||
MissileSender.Clear()
|
||||
|
||||
DataManager.SelfUser.room_id = ""
|
||||
NetResetConnectWindow.CloseNetReset()
|
||||
Voice.CrealRecord()
|
||||
ControllerManager.resetJionRoom = false
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ local function GetObj()
|
|||
return re
|
||||
end
|
||||
|
||||
return UIPackage.CreateObjectFromURL("ui://Main_Majiang/Missile")
|
||||
return UIPackage.CreateObjectFromURL("ui://Common/Missile")
|
||||
end
|
||||
|
||||
local function BackObj(obj)
|
||||
|
|
@ -60,8 +60,9 @@ function MissileSender.Send(url, send, target, root, animUrl, Missile, num, time
|
|||
obj:TweenMove(targetPos, time):OnComplete(function()
|
||||
BackObj(obj)
|
||||
--动画击中头像后播放击中的音效和动画
|
||||
root:PlayMJSound(string.format("%s.mp3", Missile))
|
||||
local clip = UIPackage.CreateObjectFromURL(string.format("ui://Main_Majiang/%s", Missile))
|
||||
ViewUtil.PlaySound("MissileSender", string.format("base/main_majiang/sound/%s.mp3", Missile))
|
||||
|
||||
local clip = UIPackage.CreateObjectFromURL(string.format("ui://Common/%s", Missile))
|
||||
clip:SetSize(clipFather.width, clipFather.height)
|
||||
clipFather:AddChild(clip)
|
||||
clip:SetPlaySettings(0, -1, 1, -1)
|
||||
|
|
|
|||
|
|
@ -165,6 +165,7 @@ end
|
|||
|
||||
function ViewManager.OnApplicationPause()
|
||||
print("game pause")
|
||||
|
||||
if (_currenView ~= nil) then
|
||||
_currenView:OnApplicationPause()
|
||||
end
|
||||
|
|
@ -172,6 +173,7 @@ end
|
|||
|
||||
function ViewManager.OnApplicationActive()
|
||||
print("game active")
|
||||
|
||||
if (_currenView ~= nil) then
|
||||
_currenView:OnApplicationActive()
|
||||
end
|
||||
|
|
|
|||
|
|
@ -353,6 +353,7 @@ function M:fillResult1(room, peopleNum, total_result)
|
|||
familyIDText.text = string.format("俱乐部:%s", room.group_id)
|
||||
else
|
||||
familyIDText.visible = false
|
||||
self._view:GetChild('n148').visible = false
|
||||
end
|
||||
self._view:GetChild("Text_RoundNum").text = string.format("局数:%s/%s", room.curren_round, room.room_config.round)
|
||||
self._view:GetChild("Text_Time").text = os.date("%Y-%m-%d %H:%M:%S", os.time())
|
||||
|
|
|
|||
|
|
@ -349,6 +349,7 @@ function M:fillResult1(room, peopleNum, total_result)
|
|||
familyIDText.text = string.format("俱乐部:%s", room.group_id)
|
||||
else
|
||||
familyIDText.visible = false
|
||||
self._view:GetChild('n148').visible = false
|
||||
end
|
||||
self._view:GetChild("Text_RoundNum").text = string.format("局数:%s/%s", room.curren_round, room.room_config.round)
|
||||
self._view:GetChild("Text_Time").text = os.date("%Y-%m-%d %H:%M:%S", os.time())
|
||||
|
|
|
|||
|
|
@ -536,6 +536,15 @@ function M:EventInit()
|
|||
self:PlayMJSound("end_music.mp3")
|
||||
end
|
||||
end
|
||||
-- 扣分动画
|
||||
if result then
|
||||
for _, pScore in pairs(result.info_list) do
|
||||
local infoView = self._player_info[self:GetPos(pScore.seat)]
|
||||
infoView:UpdateScore(pScore.total_score, true)
|
||||
end
|
||||
end
|
||||
coroutine.wait(0.3)
|
||||
|
||||
coroutine.wait(0.5)
|
||||
self._clearingView:Show()
|
||||
self._popEvent = true
|
||||
|
|
|
|||
|
|
@ -342,6 +342,7 @@ function M:fillResult1(room, peopleNum, total_result)
|
|||
familyIDText.text = string.format("俱乐部:%s", room.group_id)
|
||||
else
|
||||
familyIDText.visible = false
|
||||
self._view:GetChild('n148').visible = false
|
||||
end
|
||||
self._view:GetChild("Text_RoundNum").text = string.format("局数:%s/%s", room.curren_round, room.room_config.round)
|
||||
self._view:GetChild("Text_Time").text = os.date("%Y-%m-%d %H:%M:%S", os.time())
|
||||
|
|
|
|||
|
|
@ -535,6 +535,15 @@ function M:EventInit()
|
|||
self:PlayMJSound("end_music.mp3")
|
||||
end
|
||||
end
|
||||
-- 扣分动画
|
||||
if result then
|
||||
for _, pScore in pairs(result.info_list) do
|
||||
local infoView = self._player_info[self:GetPos(pScore.seat)]
|
||||
infoView:UpdateScore(pScore.total_score, true)
|
||||
end
|
||||
end
|
||||
coroutine.wait(0.3)
|
||||
|
||||
coroutine.wait(0.5)
|
||||
self._clearingView:Show()
|
||||
self._popEvent = true
|
||||
|
|
|
|||
|
|
@ -352,6 +352,7 @@ function M:fillResult1(room, peopleNum, total_result)
|
|||
familyIDText.text = string.format("俱乐部:%s", room.group_id)
|
||||
else
|
||||
familyIDText.visible = false
|
||||
self._view:GetChild('n148').visible = false
|
||||
end
|
||||
self._view:GetChild("Text_RoundNum").text = string.format("局数:%s/%s", room.curren_round, room.room_config.round)
|
||||
self._view:GetChild("Text_Time").text = os.date("%Y-%m-%d %H:%M:%S", os.time())
|
||||
|
|
|
|||
|
|
@ -537,10 +537,12 @@ function M:EventInit()
|
|||
end
|
||||
|
||||
-- 扣分动画
|
||||
if result then
|
||||
for _, pScore in pairs(result.info_list) do
|
||||
local infoView = self._player_info[self:GetPos(pScore.seat)]
|
||||
infoView:UpdateScore(pScore.total_score, true)
|
||||
end
|
||||
end
|
||||
coroutine.wait(0.3)
|
||||
|
||||
coroutine.wait(0.5)
|
||||
|
|
|
|||
|
|
@ -405,7 +405,7 @@ function M:CheckOutCardGetTouchSet(cardSet, cardMap, cardType, longLength)
|
|||
if lastCard - card == -1 then
|
||||
tempLong = tempLong + 1
|
||||
else
|
||||
if tempLong >= longLength and not self._flag_mustMax then
|
||||
if tempLong >= longLength and (cardType ~= 1 or longLength >= 5 or not self._flag_mustMax) then
|
||||
for j = 1, tempLong do
|
||||
table.insert(self.touchCardSet, tempCardSet[j])
|
||||
self.touchCardMao[tempCardSet[j]] = 1
|
||||
|
|
@ -427,7 +427,7 @@ function M:CheckOutCardGetTouchSet(cardSet, cardMap, cardType, longLength)
|
|||
end
|
||||
if tempLong >= longLength then
|
||||
for j = 1, tempLong do
|
||||
if j == tempLong or not self._flag_mustMax then
|
||||
if cardType ~= 1 or longLength >= 5 or not self._flag_mustMax or j == tempLong then
|
||||
table.insert(self.touchCardSet, tempCardSet[j])
|
||||
self.touchCardMao[tempCardSet[j]] = 1
|
||||
end
|
||||
|
|
@ -456,7 +456,7 @@ function M:CheckOutCardSetTipList(tipCardSet, longLength, cardMap, cardType)
|
|||
tempSanDaiCard[card] = true
|
||||
local minNum = Mathf.Min(cardMap[card].value, cardType)
|
||||
for k = 1, minNum do
|
||||
if not self._flag_mustMax or card == self.maxCard then
|
||||
if cardType ~= 1 or longLength >= 5 or not self._flag_mustMax or card == self.maxCard then
|
||||
table.insert(tempList, cardMap[card].cardList[k])
|
||||
end
|
||||
end
|
||||
|
|
@ -490,7 +490,7 @@ function M:CheckOutCardSetTipList(tipCardSet, longLength, cardMap, cardType)
|
|||
tempSanDaiCard[card] = true
|
||||
local minNum = Mathf.Min(cardMap[card].value, cardType)
|
||||
for l = 1, minNum do
|
||||
if not self._flag_mustMax or card == self.maxCard then
|
||||
if cardType ~= 1 or longLength >= 5 or not self._flag_mustMax or card == self.maxCard then
|
||||
table.insert(tempList, cardMap[card].cardList[l])
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -283,9 +283,27 @@ function M:OnChangeOption(ctype, pay_obj)
|
|||
end)
|
||||
end
|
||||
|
||||
function M:LoadConfigToDetail(data)
|
||||
local configData = json.decode(data)
|
||||
local returnString = string.format("人数%s人", configData.maxPlayers)
|
||||
function M:LoadConfigToDetail(data, hpdata)
|
||||
local configData = data
|
||||
if type(data) == 'string' then
|
||||
configData = json.decode(data)
|
||||
end
|
||||
|
||||
local hpData = configData.hpData or hpdata
|
||||
if type(hpData) == 'string' then
|
||||
if hpData == "null" then
|
||||
hpData = nil
|
||||
else
|
||||
hpData = json.decode(hpData)
|
||||
end
|
||||
end
|
||||
local returnString = ""
|
||||
|
||||
if hpData then
|
||||
returnString = string.format("%s倍,", hpData.times / 1000)
|
||||
end
|
||||
|
||||
returnString = string.format("%s人数%s人", returnString, configData.maxPlayers)
|
||||
if configData.leaf then
|
||||
returnString = string.format("%s,%s", returnString, configData.leaf == 1 and "十五张手牌" or "十六张手牌")
|
||||
end
|
||||
|
|
@ -293,9 +311,6 @@ function M:LoadConfigToDetail(data)
|
|||
returnString = string.format("%s%s", returnString,
|
||||
configData.rule == 1 and ",黑桃三必出" or "")
|
||||
end
|
||||
if configData.showlength then
|
||||
-- returnString = string.format("%s,%s", returnString, configData.zimo == 0 and "可点炮,可自摸" or "必须自摸")
|
||||
end
|
||||
if configData.planeNoBelt then
|
||||
returnString = string.format("%s%s", returnString, configData.planeNoBelt == 0 and "" or ",飞机可不带")
|
||||
end
|
||||
|
|
@ -317,6 +332,9 @@ function M:LoadConfigToDetail(data)
|
|||
if configData.specilAdd then
|
||||
returnString = string.format("%s%s", returnString, configData.specilAdd == 0 and "" or ",特殊加分")
|
||||
end
|
||||
|
||||
returnString = returnString .. IGameInfo.LoadConfigToDetail(self, configData, hpData)
|
||||
|
||||
return returnString
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -133,9 +133,9 @@ function M:InitView(url)
|
|||
self:UpdateRound(0)
|
||||
|
||||
--按钮功能全部未开放
|
||||
self._view:GetChild('Btn_Spectator').onClick:Set(function()
|
||||
ViewUtil.ErrorMsg(self._view, "", "该功能还未开放")
|
||||
end)
|
||||
-- self._view:GetChild('Btn_Spectator').onClick:Set(function()
|
||||
-- ViewUtil.ErrorMsg(self._view, "", "该功能还未开放")
|
||||
-- end)
|
||||
self._view:GetChild('Btn_Invite').onClick:Set(function()
|
||||
ViewUtil.ErrorMsg(self._view, "", "该功能还未开放")
|
||||
end)
|
||||
|
|
|
|||
|
|
@ -184,6 +184,7 @@ function M:OnInitCard(evt_data)
|
|||
for _, player in ipairs(self._room.player_list) do
|
||||
player:Clear()
|
||||
player.hand_count = #cardlist
|
||||
player.hand_list = cardlist
|
||||
end
|
||||
|
||||
self._room.curren_round = round
|
||||
|
|
|
|||
|
|
@ -210,12 +210,12 @@ function M:InitView(url)
|
|||
|
||||
self._cardCheck = RunFast_CardCheck:InitFlag()
|
||||
self._gamectr._cardCheck = self._cardCheck
|
||||
self:UpdateRound(0)
|
||||
self:UpdateRound(self._room.curren_round or 0)
|
||||
|
||||
--按钮功能全部未开放
|
||||
self._view:GetChild('Btn_Spectator').onClick:Set(function()
|
||||
ViewUtil.ErrorMsg(self._view, "", "该功能还未开放")
|
||||
end)
|
||||
-- self._view:GetChild('Btn_Spectator').onClick:Set(function()
|
||||
-- ViewUtil.ErrorMsg(self._view, "", "该功能还未开放")
|
||||
-- end)
|
||||
-- self._view:GetChild('Btn_GamePlay').onClick:Set(function()
|
||||
-- ViewUtil.ErrorMsg(self._view, "", "该功能还未开放")
|
||||
-- end)
|
||||
|
|
@ -240,6 +240,24 @@ function M:InitView(url)
|
|||
--闹钟倒计时报时
|
||||
self._leftTime_xiangling = 5
|
||||
self._leftTime_bianhong = true
|
||||
|
||||
local btn_witness = self._view:GetChild('btn_pangGuang')
|
||||
if btn_witness then
|
||||
btn_witness.onClick:Set(function()
|
||||
self._view:GetController('witness').selectedIndex = 1
|
||||
end)
|
||||
end
|
||||
----------屏幕大小发生变化
|
||||
GRoot.inst.onSizeChanged:Set(function()
|
||||
for _, player in ipairs(self._room.player_list) do
|
||||
local player_card_info = self._player_card_info[self:GetPos(player.seat)]
|
||||
|
||||
if player.seat == self._room.self_player.seat then
|
||||
player_card_info:InitPoker(player.hand_list, false)
|
||||
else
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
function M:UpdateCard(index)
|
||||
|
|
@ -509,13 +527,14 @@ function M:EventInit()
|
|||
-- body
|
||||
head_info._view:GetChild("shengyu").text = p.hand_count
|
||||
end
|
||||
p:Clear()
|
||||
-- p:Clear()
|
||||
head_info:MarkBank(p.seat == _room.banker_seat)
|
||||
head_info:FillData(p)
|
||||
local card_info = self._player_card_info[self:GetPos(p.seat)]
|
||||
card_info:Clear()
|
||||
head_info:Ready(false)
|
||||
|
||||
|
||||
if p.seat == self._room.self_player.seat then
|
||||
if self._room.room_config.people_num == 3 and self._room.room_config.fangzuobi == 1 then
|
||||
-- body
|
||||
|
|
@ -567,6 +586,7 @@ function M:EventInit()
|
|||
-- end
|
||||
self._leftClock_continue = coroutine.start(function()
|
||||
coroutine.wait(0.2)
|
||||
card_info:SetOutCardInfo(nil, false)
|
||||
for i = 1, #self._player_card_info do
|
||||
local card_info = self._player_card_info[i]
|
||||
if i == index then
|
||||
|
|
@ -609,7 +629,7 @@ function M:EventInit()
|
|||
|
||||
_gamectr:AddEventListener(RunFast_GameEvent.OnPlaySucc, function(...)
|
||||
ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/runfast/sound/playcard_chup.mp3")
|
||||
self._popEvent = false
|
||||
-- self._popEvent = false
|
||||
local arg = { ... }
|
||||
local p = arg[1]
|
||||
local card_number = arg[2]
|
||||
|
|
@ -803,7 +823,7 @@ function M:EventInit()
|
|||
local m = false
|
||||
local next_seat = self._room.self_player.seat + 1
|
||||
local card_info = self._player_card_info[1]
|
||||
--card_info:SetOutCardInfo(nil, false)
|
||||
card_info:SetOutCardInfo(nil, false)
|
||||
if self.MypokerList ~= nil then
|
||||
-- body
|
||||
card_info:Clear()
|
||||
|
|
@ -818,7 +838,6 @@ function M:EventInit()
|
|||
end
|
||||
local zdts = self._view:GetController("zidongtishi").selectedIndex
|
||||
-- self._player_card_info[1]._cardCheck:InitLastCard(lastCardList)
|
||||
card_info:SetOutCardInfo(nil, false)
|
||||
-- self._player_card_info[1]:ShowOutCardOption(ctr_number, card_type, card_number, card_length, m, play, zdts)
|
||||
card_info:ShowOutCardOption2(lastCardList, ctr_number, m)
|
||||
end)
|
||||
|
|
@ -1105,26 +1124,7 @@ function M:ReConnectForStart()
|
|||
local head_info = self._player_info[self:GetPos(player.seat)]
|
||||
head_info:Ready(false)
|
||||
|
||||
--如果是体力值不可负分模式 则显示当前的hp值
|
||||
if player.hp_info ~= nil and player.hp_info.cur_hp ~= nil then
|
||||
head_info:UpdateScore(d2ad(player.hp_info.cur_hp))
|
||||
head_info._view:GetChild('zhanji').visible = true
|
||||
local num = player.hp_info.total_hp
|
||||
if num > 0 then
|
||||
head_info._view:GetController('text_color').selectedIndex = 0
|
||||
head_info._view:GetChild('text_jifen').text = '+' .. d2ad(player.hp_info.total_hp)
|
||||
else
|
||||
head_info._view:GetController('text_color').selectedIndex = 1
|
||||
head_info._view:GetChild('text_jifen').text = d2ad(player.hp_info.total_hp)
|
||||
end
|
||||
else
|
||||
local rt = 1
|
||||
if self._room.hpOnOff == 1 then
|
||||
rt = self._room.score_times
|
||||
end
|
||||
head_info:UpdateScore(player.total_score * rt)
|
||||
end
|
||||
|
||||
head_info:UpdateScore(player.total_score)
|
||||
head_info:UpdateLineState(player.line_state)
|
||||
head_info:UpdatePiao(player.piao)
|
||||
head_info:SetBaoDan(player.hand_count == 1)
|
||||
|
|
@ -1158,16 +1158,16 @@ function M:ReConnectForStart()
|
|||
-- self.bgm_index = 2
|
||||
end
|
||||
end
|
||||
if self._room.curren_turn_seat ~= player.seat then
|
||||
if self._room.curren_turn_seat == player.seat then
|
||||
-- head_info:MarkBank(false)
|
||||
player_card_info._ctr_time_clock.selectedIndex = 1
|
||||
self._tex_leftTime = player_card_info._view_comp_clock
|
||||
self._left_time = 15
|
||||
if player.out_card_list[1] == 0 then
|
||||
-- if player.out_card_list[1] == 0 then
|
||||
player_card_info:SetOutCardInfo(nil, false)
|
||||
else
|
||||
player_card_info:SetOutCardInfo(player.out_card_list, false)
|
||||
end
|
||||
-- else
|
||||
-- player_card_info:SetOutCardInfo(player.out_card_list, false)
|
||||
-- end
|
||||
else
|
||||
-- head_info:MarkBank(true)
|
||||
end
|
||||
|
|
@ -1611,6 +1611,9 @@ function M:Destroy()
|
|||
coroutine.stop(card_info_i.cor_init_poker)
|
||||
end
|
||||
end
|
||||
GRoot.inst.onSizeChanged:Set(function()
|
||||
|
||||
end)
|
||||
PKMainView.Destroy(self)
|
||||
UIPackage.RemovePackage("extend/poker/runfast/ui/Extend_Poker_RunFastNew")
|
||||
end
|
||||
|
|
|
|||
|
|
@ -233,15 +233,11 @@ function M:InitPoker(pokerList, isPlayAni, open)
|
|||
-- local btn_card = self:CreatPoker(card_number_code, cs, open)
|
||||
local btn_card = self._view_handCard:AddItemFromPool()
|
||||
self:FillPoker(btn_card, "", card_number_code)
|
||||
-- local x, y = self._view.width / 2 + 100, -200
|
||||
-- btn_card:SetXY(x, y)
|
||||
btn_card.alpha = 0
|
||||
btn_card.touchable = false
|
||||
-- coroutine.wait(0.05)
|
||||
-- self.cards_view:AddChild(btn_card)
|
||||
local card_view = NewCardView(btn_card, card_number_code, card_flower_code)
|
||||
self.card_list[#self.card_list + 1] = card_view
|
||||
|
||||
btn_card.data = card_view
|
||||
self:AddTouchMoveEvent(self._view_handCard)
|
||||
|
||||
if i == #pokerList then
|
||||
|
|
@ -256,10 +252,8 @@ function M:InitPoker(pokerList, isPlayAni, open)
|
|||
end
|
||||
end
|
||||
for j = #self.card_list, 1, -1 do
|
||||
-- ViewUtil.PlaySound('RunFastNew_PK', 'extend/poker/runfast/sound/mopai.mp3')
|
||||
local card_view = self.card_list[j]
|
||||
card_view.index = j
|
||||
-- self.cards_view:SetChildIndex(card_view.btn_card, card_view.index - 1)
|
||||
|
||||
card_view.btn_card:TweenMove(self:GetHandCardPos(j, #self.card_list), 0.10)
|
||||
DSTween.To(
|
||||
|
|
@ -296,15 +290,13 @@ function M:InitPoker(pokerList, isPlayAni, open)
|
|||
-- self.cards_view:AddChild(btn_card)
|
||||
local card_view = NewCardView(btn_card, card_number_code, card_flower_code)
|
||||
self.card_list[#self.card_list + 1] = card_view
|
||||
btn_card.data = card_view
|
||||
btn_card.width = (GRoot.inst.width * 0.95 - self._view_handCard.columnGap * 15) / 16
|
||||
end
|
||||
table.sort(self.card_list, tableSortNumber)
|
||||
self:AddTouchMoveEvent(self._view_handCard)
|
||||
for i = 1, #self.card_list do
|
||||
local card = self.card_list[i]
|
||||
-- card.index = i
|
||||
-- self.cards_view:SetChildIndex(card.btn_card, card.index - 1)
|
||||
-- card.btn_card.xy = self:GetHandCardPos(i, #self.card_list)
|
||||
if open ~= 1 then
|
||||
-- body
|
||||
self:AddCardTouchEvent(card)
|
||||
|
|
@ -321,114 +313,6 @@ function M:updatePoker()
|
|||
self:InitPoker(templist, false, 0)
|
||||
end
|
||||
|
||||
-- function M:AddCardMoveEvent(card)
|
||||
-- local send_card = {}
|
||||
|
||||
-- card.btn_card.onTouchBegin:Set(
|
||||
-- function(context)
|
||||
-- self.send_card = {}
|
||||
-- if card.btn_card.touchable == false then
|
||||
-- return
|
||||
-- end
|
||||
-- local fristCard = self._view_handCard:GetChildAt(0)
|
||||
-- local CardWidth = fristCard.width
|
||||
-- local columnGap = self._view_handCard.columnGap
|
||||
-- local oneCardWidth = CardWidth - columnGap
|
||||
-- local xy = fristCard:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y))
|
||||
-- -- if xy.y > -21 and xy.y < 316 then
|
||||
-- self.touchBegin = xy
|
||||
-- Stage.inst.onTouchMove:Add(self.touchMoveFun)
|
||||
-- --Stage.inst.onClick:Add(self.touchMoveFun)
|
||||
-- card.btn_card.onTouchEnd:Set(
|
||||
-- function(context)
|
||||
-- local downCards = #self.card_list
|
||||
-- local xy = fristCard:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y))
|
||||
-- Stage.inst.onTouchMove:Remove(self.touchMoveFun)
|
||||
-- --Stage.inst.onClick:onTouchMove(self.touchMoveFun)
|
||||
-- -- if xy.y > -21 and xy.y < 316 then
|
||||
-- local max_x
|
||||
-- local min_x
|
||||
-- if xy.x - self.touchBegin.x > 0 then
|
||||
-- max_x = xy.x
|
||||
-- min_x = self.touchBegin.x
|
||||
-- else
|
||||
-- max_x = self.touchBegin.x
|
||||
-- min_x = xy.x
|
||||
-- end
|
||||
|
||||
-- for k = 1, #self.card_list do
|
||||
-- local card = self.card_list[k]
|
||||
-- if not card.btn_card.selected then
|
||||
-- downCards = downCards - 1
|
||||
-- end
|
||||
-- -- for i = 1, #self.card_list do
|
||||
-- -- local card = self.card_list[i]
|
||||
-- -- if card.btn_card.selected then
|
||||
-- -- send_card[#send_card + 1] = card.card_code_flower
|
||||
-- -- self.send_card[#self.send_card + 1] = card
|
||||
-- -- end
|
||||
-- -- end
|
||||
-- if card.btn_card.touchable == true then
|
||||
-- send_card[#send_card + 1] = card
|
||||
|
||||
-- self:SetBtnCardColor(card, 0)
|
||||
-- -- if k == #self.card_list then
|
||||
-- -- if
|
||||
-- -- card.btn_card.x + self.card_width > min_x and card.btn_card.x < max_x and
|
||||
-- -- card.card_isTouchable == 0
|
||||
-- -- then
|
||||
-- -- self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false)
|
||||
-- -- --ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3")
|
||||
-- -- end
|
||||
-- -- else
|
||||
-- -- if
|
||||
-- -- card.btn_card.x +
|
||||
-- -- (self.card_width + self:GetHandCardOffset(#self.card_list)) >
|
||||
-- -- min_x and
|
||||
-- -- card.btn_card.x < max_x and
|
||||
-- -- card.card_isTouchable == 0
|
||||
-- -- then
|
||||
-- -- self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false)
|
||||
-- -- --ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3")
|
||||
-- -- end
|
||||
-- -- end
|
||||
-- if
|
||||
-- (card.btn_card.x + oneCardWidth > min_x or (k == #self.card_list and card.btn_card.x + CardWidth > min_x))
|
||||
-- and card.btn_card.x < max_x and card.card_isTouchable == 0
|
||||
-- then
|
||||
-- self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false)
|
||||
-- --ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3")
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
|
||||
-- ViewUtil.PlaySound('RunFastNew_PK', 'extend/poker/runfast/sound/click.mp3')
|
||||
|
||||
-- Stage.inst:ResetInputState()
|
||||
-- card.btn_card.onTouchEnd:Set(nil)
|
||||
|
||||
-- if downCards == 0 then
|
||||
-- self:zhizhanxuanpai()
|
||||
-- end
|
||||
-- end
|
||||
-- )
|
||||
-- -- else
|
||||
-- -- local button = card.btn_card
|
||||
-- -- button.onChanged:Add(
|
||||
-- -- function()
|
||||
-- -- -- body
|
||||
-- -- if card.btn_card.selected == true then
|
||||
-- -- self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false)
|
||||
-- -- else
|
||||
-- -- self:UpdateCardMove(card.btn_card, card.btn_card.selected, false)
|
||||
-- -- end
|
||||
-- -- end
|
||||
-- -- )
|
||||
-- -- end
|
||||
-- end
|
||||
-- )
|
||||
-- end
|
||||
|
||||
function M:AddTouchMoveEvent(list)
|
||||
local send_card = {}
|
||||
|
||||
|
|
@ -447,20 +331,6 @@ function M:AddTouchMoveEvent(list)
|
|||
self.touchBegin = xy
|
||||
Stage.inst.onTouchMove:Add(self.touchMoveFun)
|
||||
Stage.inst.onTouchEnd:Add(self.touchMoveEndFun)
|
||||
--Stage.inst.onClick:Add(self.touchMoveFun)
|
||||
-- else
|
||||
-- local button = card.btn_card
|
||||
-- button.onChanged:Add(
|
||||
-- function()
|
||||
-- -- body
|
||||
-- if card.btn_card.selected == true then
|
||||
-- self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false)
|
||||
-- else
|
||||
-- self:UpdateCardMove(card.btn_card, card.btn_card.selected, false)
|
||||
-- end
|
||||
-- end
|
||||
-- )
|
||||
-- end
|
||||
end
|
||||
)
|
||||
end
|
||||
|
|
@ -476,60 +346,6 @@ function M:AddCardTouchEvent(card)
|
|||
)
|
||||
end
|
||||
|
||||
-- function M:zhizhanxuanpai() --智障选牌
|
||||
-- print("lingmengxuan", #self.send_card)
|
||||
-- -- body
|
||||
-- local temp_send_card = {}
|
||||
-- for i = 1, #self.send_card do
|
||||
-- if self.send_card[i] ~= self.send_card[i - 1] then
|
||||
-- -- body
|
||||
-- temp_send_card[#temp_send_card + 1] = self.send_card[i]
|
||||
-- end
|
||||
-- end
|
||||
|
||||
-- local card_map, max_key = self:GetCardMapAndMaxKey(temp_send_card)
|
||||
|
||||
-- list_type1, touch_type1 = self:CheckPairs(card_map, 0, 8)
|
||||
|
||||
-- list_type2, touch_type2 = self:CheckPlane(card_map, 0, 6, 0)
|
||||
-- list_bomb, touch_bomb = self:CheckBomb(card_map, 0, 4)
|
||||
|
||||
-- local list_type, touch_type = self:CheckOnes(card_map, 0, 11)
|
||||
-- for i = 5, 11 do
|
||||
-- local list_temp, touch_temp = self:CheckOnes(card_map, 0, i)
|
||||
-- if list_temp[1] ~= nil then
|
||||
-- -- body
|
||||
-- list_type = list_temp
|
||||
-- end
|
||||
-- end
|
||||
-- local temp_list = list_type[1]
|
||||
-- local temp_list1 = list_type1[1]
|
||||
-- local temp_list2 = list_type2[1]
|
||||
-- local temp_bomb = list_bomb[1]
|
||||
-- if self.xunpai == nil then
|
||||
-- -- body
|
||||
-- self.xunpai = {}
|
||||
-- end
|
||||
|
||||
-- -- if temp_list ~= nil and temp_list1 == nil and temp_list2 == nil and temp_bomb == nil and #temp_list > #self.xunpai then
|
||||
-- if temp_list ~= nil and temp_list1 == nil and temp_list2 == nil and temp_bomb == nil then
|
||||
-- -- for i = 1, #self.send_card do
|
||||
-- for i = 1, #self.card_list do
|
||||
-- self:UpdateCardMove(self.card_list[i].btn_card, false, false)
|
||||
-- end
|
||||
-- for i = 1, #self.send_card do
|
||||
-- for j = 1, #temp_list do
|
||||
-- if self.send_card[i] == temp_list[j] then
|
||||
-- -- body
|
||||
-- self:UpdateCardMove(self.send_card[i].btn_card, true, false)
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
-- self.xunpai = temp_list
|
||||
-- else
|
||||
-- self.xunpai = {}
|
||||
-- end
|
||||
-- end
|
||||
function M:zhizhanxuanpai() --智障选牌
|
||||
-- body
|
||||
local temp_send_card = {}
|
||||
|
|
@ -561,88 +377,6 @@ function M:zhizhanxuanpai() --智障选牌
|
|||
end
|
||||
end
|
||||
|
||||
-- function M:TouchMoving(context)
|
||||
-- if self.cards_view == nil then
|
||||
-- return
|
||||
-- end
|
||||
-- local send_card1 = {}
|
||||
-- local xy = self.cards_view:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y))
|
||||
-- self.isTouching = true
|
||||
-- if xy.x - self.touchBegin.x > 0 then -- 往右边滑
|
||||
-- local max_x = xy.x
|
||||
-- local min_x = self.touchBegin.x
|
||||
-- for i = 1, #self.card_list do
|
||||
-- local card = self.card_list[i]
|
||||
-- if card.btn_card.touchable == false or card.card_isTouchable == 1 then
|
||||
-- else
|
||||
-- if
|
||||
-- card.btn_card.x + (self.card_width + self:GetHandCardOffset(#self.card_list)) > min_x and
|
||||
-- card.btn_card.x < max_x
|
||||
-- then
|
||||
-- printlog("cccccccccccccc22222222222222")
|
||||
-- self:SetBtnCardColor(card, 0.8)
|
||||
-- if #send_card1 == 0 then
|
||||
-- -- body
|
||||
-- send_card1[1] = card
|
||||
-- end
|
||||
-- for i = 1, #send_card1 do
|
||||
-- if send_card1[i] ~= card then
|
||||
-- -- body
|
||||
-- send_card1[#send_card1 + 1] = card
|
||||
-- end
|
||||
-- end
|
||||
-- else
|
||||
-- -- self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false)
|
||||
-- -- card.card_isTouchable = 1
|
||||
-- -- ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3")
|
||||
-- self:SetBtnCardColor(card, 1)
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
-- elseif xy.x - self.touchBegin.x < 0 then -- 左边滑
|
||||
-- local max_x = self.touchBegin.x
|
||||
-- local min_x = xy.x
|
||||
-- for i = 1, #self.card_list do
|
||||
-- local card = self.card_list[i]
|
||||
-- if card.btn_card.touchable == false or card.card_isTouchable == 1 then
|
||||
-- else
|
||||
-- if
|
||||
-- card.btn_card.x + (self.card_width + self:GetHandCardOffset(#self.card_list)) > min_x and
|
||||
-- card.btn_card.x < max_x
|
||||
-- then
|
||||
-- -- self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false)
|
||||
-- -- card.card_isTouchable = 1
|
||||
-- -- ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3")
|
||||
-- self:SetBtnCardColor(card, 0.8)
|
||||
-- if #send_card1 == 0 then
|
||||
-- -- body
|
||||
-- send_card1[1] = card
|
||||
-- end
|
||||
-- for i = 1, #send_card1 do
|
||||
-- if send_card1[i] ~= card then
|
||||
-- -- body
|
||||
-- send_card1[#send_card1 + 1] = card
|
||||
-- end
|
||||
-- end
|
||||
-- else
|
||||
-- self:SetBtnCardColor(card, 1)
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
-- ---- print(vardump(send_card1))
|
||||
-- -- local send_card = {}
|
||||
-- -- self.send_card = {}
|
||||
-- -- for i = 1, #self.card_list do
|
||||
-- -- local card = self.card_list[i]
|
||||
-- -- if card.btn_card.selected then
|
||||
-- -- send_card[#send_card + 1] = card.card_code_flower
|
||||
-- -- self.send_card[#self.send_card + 1] = card
|
||||
-- -- end
|
||||
-- -- end
|
||||
-- self.send_card = send_card1
|
||||
-- end
|
||||
|
||||
function M:TouchMoving(context)
|
||||
if self._view_handCard == nil then
|
||||
return
|
||||
|
|
@ -664,8 +398,9 @@ function M:TouchMoving(context)
|
|||
max_x = self.touchBegin.x
|
||||
min_x = xy.x
|
||||
end
|
||||
for i = 1, #self.card_list do
|
||||
local card = self.card_list[i]
|
||||
|
||||
for i = 1, self._view_handCard.numItems do
|
||||
local card = self._view_handCard:GetChildAt(i - 1).data
|
||||
if card.btn_card.touchable == false or card.card_isTouchable == 1 then
|
||||
else
|
||||
if
|
||||
|
|
@ -711,8 +446,8 @@ function M:TouchMoveEnd(context)
|
|||
min_x = xy.x
|
||||
end
|
||||
|
||||
for k = 1, #self.card_list do
|
||||
local card = self.card_list[k]
|
||||
for k = 1, self._view_handCard.numItems do
|
||||
local card = self._view_handCard:GetChildAt(k - 1).data
|
||||
table.insert(currentCard, card.card_code_flower)
|
||||
if not card.btn_card.selected then
|
||||
downCards = downCards - 1
|
||||
|
|
|
|||
|
|
@ -196,9 +196,9 @@ function M:InitView(url)
|
|||
self:UpdateRound(0)
|
||||
|
||||
--按钮功能全部未开放
|
||||
self._view:GetChild('Btn_Spectator').onClick:Set(function()
|
||||
ViewUtil.ErrorMsg(self._view, "", "该功能还未开放")
|
||||
end)
|
||||
-- self._view:GetChild('Btn_Spectator').onClick:Set(function()
|
||||
-- ViewUtil.ErrorMsg(self._view, "", "该功能还未开放")
|
||||
-- end)
|
||||
self._view:GetChild('Btn_GamePlay').onClick:Set(function()
|
||||
ViewUtil.ErrorMsg(self._view, "", "该功能还未开放")
|
||||
end)
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ local Fix_Msg_Chat = {
|
|||
|
||||
--- Create a new ZZ_MainView
|
||||
function M.new()
|
||||
setmetatable(M, {__index = ZPMainView})
|
||||
local self = setmetatable({}, {__index = M})
|
||||
setmetatable(M, { __index = ZPMainView })
|
||||
local self = setmetatable({}, { __index = M })
|
||||
self.class = 'RunBeard_MainView'
|
||||
self._full = true
|
||||
self:init()
|
||||
|
|
@ -36,6 +36,7 @@ function M:getCardItem(card_1, card_2)
|
|||
return card_1 .. '2_' .. card_2
|
||||
end
|
||||
end
|
||||
|
||||
function M:InitView(url)
|
||||
local _room = self._room
|
||||
self.Fix_Msg_Chat = Fix_Msg_Chat
|
||||
|
|
@ -127,12 +128,14 @@ function M:NewPlayerCardInfoView(view, index)
|
|||
end
|
||||
return PlayerCardInfoView.new(view, self)
|
||||
end
|
||||
|
||||
function M:closeTipOnTuoguan()
|
||||
if self._clearingView ~= nil then
|
||||
self._clearingView:Close()
|
||||
end
|
||||
self:__CloseTip()
|
||||
end
|
||||
|
||||
function M:EventInit()
|
||||
MainView.EventInit(self)
|
||||
local _room = self._room
|
||||
|
|
@ -140,31 +143,27 @@ function M:EventInit()
|
|||
local _player_info = self._player_info
|
||||
local _gamectr = self._gamectr
|
||||
|
||||
_gamectr:AddEventListener(GameEvent.EventXiPai,function( ... )
|
||||
local arg = {...}
|
||||
local currentPlayer1=arg[1]
|
||||
local currentPlayer2=arg[2]
|
||||
printlog("jefe AddEventListener===》》》》",arg)
|
||||
_gamectr:AddEventListener(GameEvent.EventXiPai, function(...)
|
||||
local arg = { ... }
|
||||
local currentPlayer1 = arg[1]
|
||||
local currentPlayer2 = arg[2]
|
||||
printlog("jefe AddEventListener===》》》》", arg)
|
||||
self._popEvent = false
|
||||
if ( currentPlayer1 ) then
|
||||
|
||||
local xipaiCB=function ()
|
||||
if (currentPlayer1) then
|
||||
local xipaiCB = function()
|
||||
self._popEvent = true
|
||||
end
|
||||
self:PlayXiPai(xipaiCB)
|
||||
|
||||
end
|
||||
|
||||
|
||||
if ( currentPlayer2 ) then
|
||||
if (currentPlayer2) then
|
||||
--self._popEvent = false
|
||||
local xipaiCB2=function ()
|
||||
local xipaiCB2 = function()
|
||||
self._popEvent = true
|
||||
end
|
||||
self:PlayXiPai1(xipaiCB2)
|
||||
end
|
||||
|
||||
|
||||
end)
|
||||
|
||||
_gamectr:AddEventListener(
|
||||
|
|
@ -213,7 +212,7 @@ function M:EventInit()
|
|||
_gamectr:AddEventListener(
|
||||
GameEvent.GetCard,
|
||||
function(...)
|
||||
local arg = {...}
|
||||
local arg = { ... }
|
||||
local seat = arg[1]
|
||||
local card = arg[2]
|
||||
local _leftcard = arg[3]
|
||||
|
|
@ -239,7 +238,7 @@ function M:EventInit()
|
|||
_gamectr:AddEventListener(
|
||||
GameEvent.AddCard,
|
||||
function(...)
|
||||
local arg = {...}
|
||||
local arg = { ... }
|
||||
local seat = arg[1]
|
||||
local card = arg[2]
|
||||
self._popEvent = false
|
||||
|
|
@ -260,7 +259,7 @@ function M:EventInit()
|
|||
_gamectr:AddEventListener(
|
||||
GameEvent.EventTurn,
|
||||
function(...)
|
||||
local arg = {...}
|
||||
local arg = { ... }
|
||||
local seat = arg[1]
|
||||
local list = _room.player_list
|
||||
local readyNum = 0
|
||||
|
|
@ -292,7 +291,7 @@ function M:EventInit()
|
|||
function(...)
|
||||
self:__CloseTip()
|
||||
self._left_time = 0
|
||||
local arg = {...}
|
||||
local arg = { ... }
|
||||
local p = arg[1]
|
||||
local card = arg[2]
|
||||
local seat = p.seat
|
||||
|
|
@ -329,7 +328,7 @@ function M:EventInit()
|
|||
self:__CloseTip()
|
||||
self._popEvent = false
|
||||
self._left_time = 0
|
||||
local arg = {...}
|
||||
local arg = { ... }
|
||||
local seat = arg[1]
|
||||
local card = arg[2]
|
||||
local p = _room:GetPlayerBySeat(seat)
|
||||
|
|
@ -343,7 +342,7 @@ function M:EventInit()
|
|||
_gamectr:AddEventListener(
|
||||
GameEvent.FZTips,
|
||||
function(...)
|
||||
local arg = {...}
|
||||
local arg = { ... }
|
||||
local _tip = arg[1]
|
||||
local _uid = arg[2]
|
||||
self:__FangziTip(_tip, _uid)
|
||||
|
|
@ -358,7 +357,7 @@ function M:EventInit()
|
|||
self._left_time = 0
|
||||
self:__CloseTip()
|
||||
self._popEvent = false
|
||||
local arg = {...}
|
||||
local arg = { ... }
|
||||
local w = arg[1]
|
||||
local l = arg[2]
|
||||
local cards = arg[3]
|
||||
|
|
@ -394,7 +393,7 @@ function M:EventInit()
|
|||
function(...)
|
||||
self._popEvent = false
|
||||
self._left_time = 0
|
||||
local arg = {...}
|
||||
local arg = { ... }
|
||||
local result = arg[1]
|
||||
local liuju = result.liuju
|
||||
local data = result.info_list
|
||||
|
|
@ -473,7 +472,7 @@ function M:EventInit()
|
|||
GameEvent.ZPResult2,
|
||||
function(...)
|
||||
self._left_time = 0
|
||||
local arg = {...}
|
||||
local arg = { ... }
|
||||
local total_result = arg[2]
|
||||
local result = arg[1]
|
||||
local over = arg[3]
|
||||
|
|
@ -530,7 +529,7 @@ function M:__FangziTip(tip, _uid)
|
|||
local url = 'ui://Main_RunBeard/Btn_fztip'
|
||||
local btn_t = _lit_fanzi:AddItemFromPool(url)
|
||||
btn_t.icon = 'ui://Main_RunBeard/newop_' .. td.type
|
||||
btn_t.data = {tip, td, tip_hu}
|
||||
btn_t.data = { tip, td, tip_hu }
|
||||
btn_t.onClick:Set(self.__TipAction, self)
|
||||
end
|
||||
if p.hand_left_count ~= 0 then
|
||||
|
|
@ -563,6 +562,7 @@ function M:__FangziTip(tip, _uid)
|
|||
_chipeng_tip.x = _chipeng_tip.x + 200
|
||||
_chipeng_tip.y = _chipeng_tip.y - 50
|
||||
end
|
||||
|
||||
function M:__TipAction(context)
|
||||
local data = context.sender.data
|
||||
local _gamectr = self._gamectr
|
||||
|
|
@ -751,7 +751,7 @@ function M:deepcopy(object)
|
|||
end
|
||||
|
||||
function M:OnFangziAction(...)
|
||||
local arg = {...}
|
||||
local arg = { ... }
|
||||
local _player_card_info = self._player_card_info
|
||||
local fz = arg[1]
|
||||
local player = arg[2]
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ function MJCheckG.new()
|
|||
self.class = 'MJCheckG'
|
||||
self._currenIndex = 0
|
||||
self._close_destroy = true
|
||||
self._close_zone = false
|
||||
self:init('ui://Common/comp_checkG')
|
||||
|
||||
return self
|
||||
|
|
@ -28,18 +29,20 @@ function M:init(url)
|
|||
|
||||
self.coroutine = coroutine.start(function(...)
|
||||
self.valueTemp = 0
|
||||
local kaTime = math.random(200)
|
||||
while self.valueTemp < 100 do
|
||||
-- 让他在72的时候卡顿一下
|
||||
if self.valueTemp > 72 and self.valueTemp < 80 then
|
||||
|
||||
if self.valueTemp >= kaTime then
|
||||
coroutine.wait(0.4)
|
||||
kaTime = 200
|
||||
end
|
||||
|
||||
self.valueTemp = self.valueTemp + math.random(4)
|
||||
local addVulse = math.random(4)
|
||||
self.valueTemp = self.valueTemp + addVulse
|
||||
self.silder.value = self.valueTemp
|
||||
coroutine.wait(0.1)
|
||||
coroutine.wait(addVulse * 0.04)
|
||||
end
|
||||
showText.text = "检测完毕,环境安全"
|
||||
coroutine.wait(2)
|
||||
coroutine.wait(0.66)
|
||||
self._view:GetController('ok_touch').selectedIndex = 1
|
||||
-- self:Destroy()
|
||||
end)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -137,9 +137,17 @@ function M:init(url)
|
|||
end)
|
||||
|
||||
self.btn_sound.onClick:Add(function()
|
||||
GameApplication.Instance.SoundMute = self.btn_sound.selected;
|
||||
if self.btn_sound.selected then
|
||||
local v = GameApplication.Instance.SoundValue
|
||||
self.slider_sound.value = 0
|
||||
GameApplication.Instance.SoundValue = 0
|
||||
PlayerPrefs.SetInt('sound', v)
|
||||
else
|
||||
local v = PlayerPrefs.GetInt('sound')
|
||||
self.slider_sound.value = v
|
||||
GameApplication.Instance.SoundValue = v
|
||||
end
|
||||
GameApplication.Instance.SoundMute = self.btn_sound.selected;
|
||||
end)
|
||||
|
||||
self.btn_music.onClick:Add(function()
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ function PKCheckG.new()
|
|||
self.class = 'PKCheckG'
|
||||
self._currenIndex = 0
|
||||
self._close_destroy = true
|
||||
self._close_zone = false
|
||||
self:init('ui://Common/comp_checkG')
|
||||
|
||||
return self
|
||||
|
|
@ -28,18 +29,20 @@ function M:init(url)
|
|||
|
||||
self.coroutine = coroutine.start(function(...)
|
||||
self.valueTemp = 0
|
||||
local kaTime = math.random(200)
|
||||
while self.valueTemp < 100 do
|
||||
-- 让他在72的时候卡顿一下
|
||||
if self.valueTemp > 72 and self.valueTemp < 80 then
|
||||
|
||||
if self.valueTemp >= kaTime then
|
||||
coroutine.wait(0.4)
|
||||
kaTime = 200
|
||||
end
|
||||
|
||||
self.valueTemp = self.valueTemp + math.random(4)
|
||||
local addVulse = math.random(4)
|
||||
self.valueTemp = self.valueTemp + addVulse
|
||||
self.silder.value = self.valueTemp
|
||||
coroutine.wait(0.1)
|
||||
coroutine.wait(addVulse * 0.04)
|
||||
end
|
||||
showText.text = "检测完毕,环境安全"
|
||||
coroutine.wait(2)
|
||||
coroutine.wait(0.66)
|
||||
self._view:GetController('ok_touch').selectedIndex = 1
|
||||
-- self:Destroy()
|
||||
end)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -110,9 +110,17 @@ function M:init(url)
|
|||
end)
|
||||
|
||||
self.btn_sound.onClick:Add(function()
|
||||
GameApplication.Instance.SoundMute = self.btn_sound.selected;
|
||||
if self.btn_sound.selected then
|
||||
local v = GameApplication.Instance.SoundValue
|
||||
self.slider_sound.value = 0
|
||||
GameApplication.Instance.SoundValue = 0
|
||||
PlayerPrefs.SetInt('sound', v)
|
||||
else
|
||||
local v = PlayerPrefs.GetInt('sound')
|
||||
self.slider_sound.value = v
|
||||
GameApplication.Instance.SoundValue = v
|
||||
end
|
||||
GameApplication.Instance.SoundMute = self.btn_sound.selected;
|
||||
end)
|
||||
|
||||
self.btn_music.onClick:Add(function()
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="1350,702">
|
||||
<controller name="ok_touch" pages="0,,1," selected="0"/>
|
||||
<displayList>
|
||||
<image id="n0_o8k8" name="n0" src="o8k87imv" fileName="images/checkG/Group 536.png" xy="0,0" size="1350,702"/>
|
||||
<component id="n2_o8k8" name="slider_check" src="o8k87imz" fileName="images/checkG/slider_checkG.xml" xy="175,234">
|
||||
|
|
@ -8,7 +9,9 @@
|
|||
<text id="n3_o8k8" name="n3" xy="339,369" size="672,102" font="ui://27vd145bg2mo7ij0" fontSize="78" color="#5a2d0e" autoSize="none" text="请稍后,检测中...">
|
||||
<relation target="" sidePair="center-center,middle-middle"/>
|
||||
</text>
|
||||
<component id="n4_o8k8" name="btn_ok" src="n2h87imc" fileName="component/pop_oneChoose/btn_oneChoose.xml" xy="462,492" size="426,139"/>
|
||||
<component id="n4_o8k8" name="btn_ok" src="n2h87imc" fileName="component/pop_oneChoose/btn_oneChoose.xml" xy="462,492" size="426,139" touchable="false" grayed="true">
|
||||
<gearLook controller="ok_touch" pages="0" values="1,0,1,0" default="1,0,0,1"/>
|
||||
</component>
|
||||
<component id="n5_o8k8" name="btn_close" src="n2h87imc" fileName="component/pop_oneChoose/btn_oneChoose.xml" xy="558,286" visible="false"/>
|
||||
</displayList>
|
||||
</component>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="112,112" pivot="0.5,0.5">
|
||||
<displayList>
|
||||
<loader id="n0_uans" name="loader" xy="56,56" pivot="0.5,0.5" anchor="true" size="112,112" aspect="true" url="ui://27vd145bqmc17jbx" align="center" vAlign="middle" fill="scaleFree">
|
||||
<relation target="" sidePair="width-width,height-height"/>
|
||||
</loader>
|
||||
</displayList>
|
||||
</component>
|
||||
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 9.1 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 8.7 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 8.7 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 863 B |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 9.2 KiB |
|
After Width: | Height: | Size: 8.8 KiB |
|
After Width: | Height: | Size: 9.4 KiB |