跑得快修正中

master
罗家炜 2025-04-27 20:22:15 +08:00
parent e01cec4dcf
commit a19b61d7ac
36 changed files with 1293 additions and 749 deletions

View File

@ -1,5 +1,5 @@
local MainRightPanelView = import('.MainRightPanelView') local MainRightPanelView = import('.MainRightPanelView')
local PlayerInfoView = import('.PlayerInfoView') local PlayerInfoView = import('.PlayerInfoView_copy')
local ChatView = import('.ChatView') local ChatView = import('.ChatView')
local DismissRoomWindow = import('.DismissRoomWindow') local DismissRoomWindow = import('.DismissRoomWindow')
local SettingView = import('.SettingView') local SettingView = import('.SettingView')
@ -232,9 +232,18 @@ function M:InitView(url, isHideIpAdds)
end end
local btn_ready = _view:GetChild('btn_ready') local btn_ready = _view:GetChild('btn_ready')
if btn_ready ~= nil then
btn_ready.onClick:Set(function() btn_ready.onClick:Set(function()
self._gamectr:PlayerReady() self._gamectr:PlayerReady()
end) end)
end
local Btn_Ready = _view:GetChild('Btn_Ready')
if Btn_Ready ~= nil then
Btn_Ready.onClick:Set(function()
self._gamectr:PlayerReady()
end)
end
if self._room.room_config.people_num ~= 2 then if self._room.room_config.people_num ~= 2 then
local btn_xipai = _view:GetChild('btn_xipai') local btn_xipai = _view:GetChild('btn_xipai')
@ -334,6 +343,42 @@ function M:InitView(url, isHideIpAdds)
end end
) )
end end
local btn_closeRoom = _view:GetChild('Btn_CloseRoom')
if btn_closeRoom ~= nil then
btn_closeRoom.onClick:Set(
function()
local tip_owner = '您是否退出房间?\n(退出房间后房间将解散)'
local tip = '您是否退出房间?' -- \n (请注意,申请洗牌后退出,不会返还洗牌分)
local tipStr = ''
if self._room.agent then
tipStr = '您是否退出房间?'
else
tipStr = self._room.owner_id == self._room.self_player.self_user.account_id and tip_owner or tip
end
local _curren_msg = MsgWindow.new(self._root_view, tipStr, MsgWindow.MsgMode.OkAndCancel)
_curren_msg.onOk:Add(
function()
if self._state.selectedIndex > 0 and self._state.selectedIndex < 3 then
ViewUtil.ErrorTip(nil, '房间已开始,无法退出游戏。')
else
ViewUtil.ShowModalWait(self._root_view)
self._gamectr:LevelRoom(
function(res)
ViewUtil.CloseModalWait()
if res.ReturnCode == 0 then
ViewManager.ChangeView(ViewManager.View_Lobby)
else
ViewUtil.ErrorTip(res.ReturnCode)
end
end
)
end
end
)
_curren_msg:Show()
end
)
end
--[[local btn_back_lobby = _view:GetChild('btn_back_lobby') --[[local btn_back_lobby = _view:GetChild('btn_back_lobby')
btn_back_lobby.displayObject.gameObject:SetActive(false) btn_back_lobby.displayObject.gameObject:SetActive(false)
if btn_back_lobby ~= nil then if btn_back_lobby ~= nil then
@ -389,9 +434,7 @@ function M:InitView(url, isHideIpAdds)
end end
end--]] end--]]
-------------------------lingmeng--------------------------- -------------------------lingmeng---------------------------
-- _view:GetChild('text_roomId').text = string.format("房间:%s", self._room.room_id) _view:GetChild('text_roomId').text = string.format("房间:%s", self._room.room_id)
-- local text_time = _view:GetChild('text_time')
-- local ProgressBar_battery = _view:GetChild('ProgressBar_jiangxi')
------------------------------------------------------------ ------------------------------------------------------------
end end

View File

@ -36,6 +36,7 @@ function M:init()
local view = self._view local view = self._view
UIPackage.AddPackage('base/chat/ui/Chat') UIPackage.AddPackage('base/chat/ui/Chat')
self._tex_player_name = view:GetChild('name') self._tex_player_name = view:GetChild('name')
self._tex_score = view:GetChild('text_score')
self._biaoqing = view:GetChild('face') self._biaoqing = view:GetChild('face')
self._chat = view:GetChild('chat') self._chat = view:GetChild('chat')
@ -160,6 +161,24 @@ function M:FillData(player)
end end
end end
function M:UpdateScore(score)
if not score then
score = self._player.total_score
-- local room = DataManager.CurrenRoom
-- if room:checkHpNonnegative() then
-- if self._player.cur_hp then
-- -- -- print(self._player.total_hp)
-- -- if self._player.total_hp then
-- -- score = d2ad(self._player.total_hp).."/"..d2ad(self._player.cur_hp)
-- -- else
-- score = d2ad(self._player.cur_hp)
-- -- end
-- end
-- end
end
self._tex_score.text = tostring(score)
end
function M:SetStartType(peopleNum, seat) function M:SetStartType(peopleNum, seat)
if peopleNum == 2 then if peopleNum == 2 then
if seat == 1 then if seat == 1 then

View File

@ -24,182 +24,46 @@ function SettingView.new(blur_view)
end end
function M:init(url) function M:init(url)
BaseWindow.init(self, url) BaseWindow.init(self, url)
local view = self._view local view = self._view
local slider_sound = view:GetChild('slider_sound') local slider_sound = view:GetChild('slider_vedio_sound')
local slider_music = view:GetChild('slider_music') local slider_music = view:GetChild('slider_vedio_music')
-- local btn_music = view:GetChild('btn_music') local btn_music = view:GetChild('btn_vedio_music')
-- local btn_sound = view:GetChild('btn_sound') local btn_sound = view:GetChild('btn_vedio_sound')
-- btn_music.selected = (GameApplication.Instance.MusicValue < 5 and false or true)
slider_sound.value = GameApplication.Instance.SoundValue
slider_music.value = GameApplication.Instance.MusicValue
-- btn_sound.selected = GameApplication.Instance.SoundValue < 5 and false or true
slider_music.onChanged:Add(
function()
GameApplication.Instance.MusicValue = slider_music.value
-- btn_music.selected = GameApplication.Instance.MusicValue < 5 and false or true
end
)
slider_sound.onChanged:Add(
function()
GameApplication.Instance.SoundValue = slider_sound.value
-- btn_sound.selected = GameApplication.Instance.SoundValue < 5 and false or true
end
)
-- btn_sound.onChanged:Add(
-- function()
-- GameApplication.Instance.SoundValue = btn_sound.selected and 50 or 0
-- slider_sound.value = GameApplication.Instance.SoundValue -- slider_sound.value = GameApplication.Instance.SoundValue
-- end
-- )
-- btn_music.onChanged:Add(
-- function()
-- GameApplication.Instance.MusicValue = btn_music.selected and 50 or 0
-- slider_music.value = GameApplication.Instance.MusicValue -- slider_music.value = GameApplication.Instance.MusicValue
-- end
-- )
self._stateController = view:GetController('state') slider_music.onChanged:Add(function()
self.cd_time_text = view:GetChild('n35') -- GameApplication.Instance.MusicValue = slider_music.value
-- btn_music.selected = false
-- GameApplication.Instance.MusicMute = false;
end)
local _btn_quit = view:GetChild('btn_quit') slider_sound.onChanged:Add(function()
if _btn_quit then -- GameApplication.Instance.SoundValue = slider_sound.value
_btn_quit.onClick:Set( -- btn_sound.selected = false
function() -- GameApplication.Instance.SoundMute = false;
local _curren_msg = MsgWindow.new(self._root_view, '您是否退出游戏?', MsgWindow.MsgMode.OkAndCancel) end)
_curren_msg.onOk:Add(
function()
Application.Quit()
end
)
_curren_msg:Show()
end
)
end
local _btn_logout = view:GetChild('btn_logout') btn_sound.onClick:Add(function()
if _btn_logout then -- GameApplication.Instance.SoundMute = btn_sound.selected;
_btn_logout.onClick:Add( end)
function()
local _curren_msg = MsgWindow.new(self._root_view, '您是否退出当前账号?', MsgWindow.MsgMode.OkAndCancel) btn_music.onClick:Add(function()
_curren_msg.onOk:Add( -- GameApplication.Instance.MusicMute = btn_music.selected;
function() end)
PlayerPrefs.DeleteKey('session_id')
PlayerPrefs.Save() local _btn_logout = self._view:GetChild('btn_closeRoom')
RestartGame() _btn_logout.onClick:Set(function()
end if self._blur_view.dismiss_room_cd_time > 0 then
) ViewUtil.ErrorTip(nil, "您还处于解散冷却时间当中,请稍后重试!")
_curren_msg:Show() else
end
)
end
local _btn_dismiss_room = view:GetChild('btn_dismiss_room')
self._btn_dismiss_room = _btn_dismiss_room
if _btn_dismiss_room then
_btn_dismiss_room.onClick:Add(
function()
local _gamectr = ControllerManager.GetController(GameController) local _gamectr = ControllerManager.GetController(GameController)
_gamectr:AskDismissRoom() _gamectr:AskDismissRoom()
self:Destroy()
end end
) end)
end
-- local btn_close = self._view:GetChild("btn_close")
-- if btn_close then
-- btn_close.onClick:Add(function( ... )
-- end)
-- end
end
--赋值bg_config
function M:GetBGConfig()
return TableBG.GetBGConfig()
end
--获得背景
function M:GetBgByGameId(game_id)
return TableBG.GetTableBG(game_id)
end
--显示背景选项,并加载背景
function M:FillBgSection(cb, game_id, default_bg, bg_config)
local view = self._view
local lst_bg = view:GetChild('lst_bg')
local ctr_bg = view:GetController('bg')
bg_config = bg_config or self:GetBGConfig()
for i = 1, #bg_config do
local config = bg_config[i]
local item = lst_bg:AddItemFromPool()
item.icon = config.thumb
--printlog("显示背景选项,并加载背景",item.icon)
item.data = config
if i > 6 then
ctr_bg:AddPage(i - 1)
end
item.onClick:Add(
function(index)
cb(config.url,i)
end
)
end
self._game_id = game_id
self._default_bg = default_bg
self._bg = self:GetBgByGameId(game_id)
if self._bg > 0 then
lst_bg.selectedIndex = self._bg - 1
else
lst_bg.selectedIndex = default_bg - 1
end
end
function M:Show()
self._stateController.selectedIndex = self.stateIndex
BaseWindow.Show(self)
if self.cd_coroutine ~= nil then
coroutine.stop(self.cd_coroutine)
end
if self._stateController.selectedIndex == 2 and self.cd_time_text ~= nil then
self.cd_coroutine =
coroutine.start(
function()
while (self.cd_time > 0) do
self:SetCanDissroom(false)
self.cd_time = self.cd_time - 1
self.cd_time = math.max(0, self.cd_time)
self.cd_time_text.text = tostring(math.ceil(self.cd_time))
if self.cd_time > 0 then
coroutine.wait(1)
end
end
self:SetCanDissroom(self._btn_dismiss_room_enable)
self.cd_time_text.text = ''
end
)
end
end
function M:Destroy()
local bg_id = self._view:GetController('bg').selectedIndex + 1
if self._bg ~= bg_id then
self._bg = bg_id
TableBG.SaveTableBG(self._game_id, self._bg)
end
BaseWindow.Destroy(self)
end
function M:SetCanDissroom(enable)
self._btn_dismiss_room.enabled = enable
end
function M:SetBtnDismissRoomEnable(enable)
self._btn_dismiss_room_enable = enable
self:SetCanDissroom(enable)
end end
return M return M

View File

@ -1,4 +1,4 @@
local PlayerInfoView = require("Game.View.PlayerInfoView") local PlayerInfoView = require("Game.View.PlayerInfoView_copy")
local M = {} local M = {}
@ -11,26 +11,20 @@ function M.new(view, mainView)
return self return self
end end
function M:FillData(player) function M:FillData(player)
PlayerInfoView.FillData(self, player) PlayerInfoView.FillData(self, player)
if player.cur_hp ~= nil then -- if player.cur_hp ~= nil then
self:UpdateScore(d2ad(player.cur_hp)) -- self:UpdateScore(d2ad(player.cur_hp))
else -- else
local rt = 1 -- local rt = 1
if self._main_view._room.hpOnOff == 1 then -- if self._main_view._room.hpOnOff == 1 then
rt = self._main_view._room.score_times -- rt = self._main_view._room.score_times
end -- end
self:UpdateScore(player.total_score * rt) -- self:UpdateScore(player.total_score * rt)
end -- end
end end
function M:UpdatePiao(piao) function M:UpdatePiao(piao)
if piao == nil or piao == -1 then if piao == nil or piao == -1 then
self._view:GetChild("piao").text = "" self._view:GetChild("piao").text = ""
elseif piao == 0 then elseif piao == 0 then
@ -48,5 +42,4 @@ function M:UpdatePiao(piao)
end end
end end
return M return M

View File

@ -30,8 +30,8 @@ local bg_config = {
function M:InitView(url) function M:InitView(url)
local room = self._room local room = self._room
UIPackage.AddPackage("extend/poker/runfast/ui/Extend_Poker_RunFastNew") UIPackage.AddPackage("extend/poker/runfast/ui/Extend_Poker_RunFastNew")
PKMainView.InitView(self, "ui://Extend_Poker_RunFastNew/RunFast_Main_" .. room.room_config.people_num, nil, 1, PKMainView.InitView(self, "ui://Extend_Poker_RunFastNew/RunFast_Main_New_" .. room.room_config.people_num, nil, 1,
default_bg, bg_config, nil, "ui://Extend_Poker_RunFastNew/SettingWindow1") default_bg, bg_config, nil)
local _room = DataManager.CurrenRoom local _room = DataManager.CurrenRoom
local user_id = DataManager.SelfUser.account_id local user_id = DataManager.SelfUser.account_id
local json_data = Utils.LoadLocalFile(user_id .. _room.game_id .. "pai") local json_data = Utils.LoadLocalFile(user_id .. _room.game_id .. "pai")
@ -199,6 +199,32 @@ function M:InitView(url)
self._view:GetChild("shengyu"):GetChild("shengyu").text = "剩余16张" self._view:GetChild("shengyu"):GetChild("shengyu").text = "剩余16张"
end end
end end
------------------lingmeng--------------------------
self._tex_leftTime = self._view:GetChild('Comp_Clock'):GetChild('time') -- 重写
self._text_currenRound = self._view:GetChild('Text_CurrenRound')
self._text_maxRound = self._view:GetChild('Text_MaxMaxRound')
self:UpdateRound(0)
--按钮功能全部未开放
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)
self._view:GetChild('Btn_Check').onClick:Set(function()
ViewUtil.ErrorMsg(self._view, "", "该功能还未开放")
end)
self._view:GetChild('Btn_Message').onClick:Set(function()
ViewUtil.ErrorMsg(self._view, "", "该功能还未开放")
end)
self._view:GetChild('Btn_Invite').onClick:Set(function()
ViewUtil.ErrorMsg(self._view, "", "该功能还未开放")
end)
----------------------------------------------------
end end
function M:UpdateCard(index) function M:UpdateCard(index)
@ -919,10 +945,10 @@ function M:EventInit()
local num = player.hp_info.total_hp local num = player.hp_info.total_hp
if num > 0 then if num > 0 then
head_info._view:GetController('text_color').selectedIndex = 0 head_info._view:GetController('text_color').selectedIndex = 0
head_info._view:GetChild('text_jifen').text = "+" .. d2ad(player.hp_info.total_hp) head_info._view:GetChild('text_score').text = "+" .. d2ad(player.hp_info.total_hp)
else else
head_info._view:GetController('text_color').selectedIndex = 1 head_info._view:GetController('text_color').selectedIndex = 1
head_info._view:GetChild('text_jifen').text = d2ad(player.hp_info.total_hp) head_info._view:GetChild('text_score').text = d2ad(player.hp_info.total_hp)
end end
card_info:PlayScore(d2ad(player.hp_info.round_actual_hp), false, win_seat == player.seat) card_info:PlayScore(d2ad(player.hp_info.round_actual_hp), false, win_seat == player.seat)
else else
@ -1057,10 +1083,10 @@ function M:ReConnectForStart()
local num = player.hp_info.total_hp local num = player.hp_info.total_hp
if num > 0 then if num > 0 then
head_info._view:GetController('text_color').selectedIndex = 0 head_info._view:GetController('text_color').selectedIndex = 0
head_info._view:GetChild('text_jifen').text = '+' .. d2ad(player.hp_info.total_hp) head_info._view:GetChild('text_score').text = '+' .. d2ad(player.hp_info.total_hp)
else else
head_info._view:GetController('text_color').selectedIndex = 1 head_info._view:GetController('text_color').selectedIndex = 1
head_info._view:GetChild('text_jifen').text = d2ad(player.hp_info.total_hp) head_info._view:GetChild('text_score').text = d2ad(player.hp_info.total_hp)
end end
else else
local rt = 1 local rt = 1
@ -1129,10 +1155,10 @@ function M:ReconnectForClearing()
local num = player.hp_info.total_hp local num = player.hp_info.total_hp
if num > 0 then if num > 0 then
head_info._view:GetController('text_color').selectedIndex = 0 head_info._view:GetController('text_color').selectedIndex = 0
head_info._view:GetChild('text_jifen').text = '+' .. d2ad(player.hp_info.total_hp) head_info._view:GetChild('text_score').text = '+' .. d2ad(player.hp_info.total_hp)
else else
head_info._view:GetController('text_color').selectedIndex = 1 head_info._view:GetController('text_color').selectedIndex = 1
head_info._view:GetChild('text_jifen').text = d2ad(player.hp_info.total_hp) head_info._view:GetChild('text_score').text = d2ad(player.hp_info.total_hp)
end end
-- player_card_info:PlayScore(d2ad(player.hp_info.round_actual_hp)) -- player_card_info:PlayScore(d2ad(player.hp_info.round_actual_hp))
else else
@ -1363,7 +1389,15 @@ end
function M:UpdateRound(round) function M:UpdateRound(round)
local total_round = self._room.room_config.Times local total_round = self._room.room_config.Times
self._text_round.text = string.format("%d / %d 局", round, total_round) -- self._text_round.text = string.format("%d / %d 局", round, total_round)
if not self._text_currenRound then
self._text_currenRound = self._view:GetChild('Text_CurrenRound')
end
if not self._text_maxRound then
self._text_maxRound = self._view:GetChild('Text_MaxMaxRound')
end
self._text_currenRound.text = round
self._text_maxRound.text = string.format("/%s局", total_round)
end end
function M:GetSoundFileName(type, num, isNewBout) function M:GetSoundFileName(type, num, isNewBout)

View File

@ -116,7 +116,7 @@ function M:FillRoomData(data)
if room.hpOnOff == 1 or room:checkHpNonnegative() then if room.hpOnOff == 1 or room:checkHpNonnegative() then
head_info._view:GetChild('zhanji').visible = true head_info._view:GetChild('zhanji').visible = true
head_info._view:GetChild('text_jifen').text = d2ad(p.total_hp) head_info._view:GetChild('text_score').text = d2ad(p.total_hp)
end end
end end
head_info:FillData(p) head_info:FillData(p)

View File

@ -287,6 +287,17 @@ function M:SetRemainCardNumber(isPlay)
--end --end
end end
function M:FillPoker(poker, prefix, num)
num = self:ChangeCodeByTo(num)
local suffix = num == 310 and (DataManager.CurrenRoom.pai == 0 and "_1" or "_2") or ""
num = num == 1 and "00" or num
if not poker.icon then
poker:GetChild('icon').url = string.format("ui://Extend_Poker_RunFastNew/%s%s%s", prefix, num, suffix)
else
poker.icon = string.format("ui://Extend_Poker_RunFastNew/%s%s%s", prefix, num, suffix)
end
end
function M:CreatPoker1(poker, scale, bank) function M:CreatPoker1(poker, scale, bank)
local poker_item = UIPackage.CreateObject("Extend_Poker_RunFastNew", "poker" .. scale * 10) local poker_item = UIPackage.CreateObject("Extend_Poker_RunFastNew", "poker" .. scale * 10)
local code = self:ChangeCodeByTo(poker) local code = self:ChangeCodeByTo(poker)

View File

@ -56,7 +56,7 @@ function M:init()
self.hand_card_list = self._view:GetChild('hand_card_list') self.hand_card_list = self._view:GetChild('hand_card_list')
self.ctr_hand_card_pos = self._view:GetChild('hand_card_list') self.ctr_hand_card_pos = self._view:GetChild('hand_card_list')
self._mask_liangpai = self._view:GetChild('mask_liangpai') self._mask_liangpai = self._view:GetChild('mask_liangpai')
self.card_width = 129 self.card_width = 171
self.cards_view = self._view:GetChild('hand_poker_c') self.cards_view = self._view:GetChild('hand_poker_c')
self.card_list = {} self.card_list = {}
self.out_card_list = {} self.out_card_list = {}
@ -77,26 +77,134 @@ function M:init()
self.send_card = {} self.send_card = {}
self.tips_click_count = 0 self.tips_click_count = 0
self:BtnEvent() self:BtnEvent()
------------------------------lingmeng------------------------
self._view_handCard = self._view:GetChild('List_HandCard')
self._view_Out = self._view:GetChild('List_Out')
self._offset_x = 100
--------------------------------------------------------------
end end
-- function M:InitPoker(pokerList, isPlayAni, open)
-- -- self.zhizhanctr_select=0
-- -- self.zhizhantype=0
-- -- self.zhizhannumber=0
-- -- self.zhizhanlength=0
-- -- self.zhizhanmustPutMaxCard=0
-- -- self.zhizhanplay=0
-- -- self.zhizhanzdts=0
-- local cs = 1.25
-- -- print("==========================DataManager.CurrenRoom.cardsize", DataManager.CurrenRoom.cardsize)
-- if DataManager.CurrenRoom.cardsize == 0 then
-- cs = 2.5
-- elseif DataManager.CurrenRoom.cardsize == 1 then
-- cs = 2
-- elseif DataManager.CurrenRoom.cardsize == 2 then
-- cs = 1.75
-- end
-- print("lingmengInitPoker", pokerList, isPlayAni, open)
-- if self.cor_init_poker ~= nil then
-- coroutine.stop(self.cor_init_poker)
-- end
-- -- -- print(vardump(self.card_list))
-- self.cor_init_poker = nil
-- self.card_list = {}
-- self.cards_view:RemoveChildren(0, -1, true)
-- if isPlayAni == true then
-- self.cor_init_poker =
-- coroutine.start(
-- function()
-- self._mainView._popEvent = false
-- if self._mainView._rightPanelView._settingView ~= nil then
-- self._mainView._rightPanelView._settingView:SetBtnDismissRoomEnable(false)
-- end
-- table.sort(pokerList)
-- for i = 1, #pokerList do
-- local card_number_code = self:ChangeOneCodeByFrom(pokerList[i])
-- local card_flower_code = pokerList[i]
-- local btn_card = self:CreatPoker(card_number_code, cs, open)
-- 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
-- table.sort(self.card_list, tableSortNumber)
-- if i == #pokerList then
-- for j = 1, #self.card_list do
-- local card = self.card_list[j]
-- card.btn_card.touchable = true
-- if open ~= 1 then
-- -- body
-- self:AddCardMoveEvent(card)
-- end
-- end
-- 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(
-- 0.7,
-- 1,
-- 0.1,
-- function(value)
-- card_view.btn_card:SetScale(value, value)
-- end
-- )
-- DSTween.To(
-- 0.7,
-- 1,
-- 0.1,
-- function(value)
-- card_view.btn_card.alpha = value
-- end
-- )
-- card_view.btn_card.alpha = 1
-- end
-- self._mainView._popEvent = true
-- if self._mainView._rightPanelView._settingView ~= nil then
-- self._mainView._rightPanelView._settingView:SetBtnDismissRoomEnable(true)
-- end
-- end
-- )
-- else
-- for i = 1, #pokerList do
-- local card_number_code = self:ChangeOneCodeByFrom(pokerList[i])
-- local card_flower_code = pokerList[i]
-- local btn_card = self:CreatPoker(card_number_code, cs, 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
-- end
-- table.sort(self.card_list, tableSortNumber)
-- 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:AddCardMoveEvent(card)
-- end
-- end
-- end
-- end
function M:InitPoker(pokerList, isPlayAni, open) function M:InitPoker(pokerList, isPlayAni, open)
-- self.zhizhanctr_select=0
-- self.zhizhantype=0
-- self.zhizhannumber=0
-- self.zhizhanlength=0
-- self.zhizhanmustPutMaxCard=0
-- self.zhizhanplay=0
-- self.zhizhanzdts=0
local cs = 1.25
-- print("==========================DataManager.CurrenRoom.cardsize", DataManager.CurrenRoom.cardsize)
if DataManager.CurrenRoom.cardsize == 0 then
cs = 2.5
elseif DataManager.CurrenRoom.cardsize == 1 then
cs = 2
elseif DataManager.CurrenRoom.cardsize == 2 then
cs = 1.75
end
if self.cor_init_poker ~= nil then if self.cor_init_poker ~= nil then
coroutine.stop(self.cor_init_poker) coroutine.stop(self.cor_init_poker)
end end
@ -104,7 +212,7 @@ function M:InitPoker(pokerList, isPlayAni, open)
self.cor_init_poker = nil self.cor_init_poker = nil
self.card_list = {} self.card_list = {}
self.cards_view:RemoveChildren(0, -1, true) self._view_handCard:RemoveChildren(0, -1, true)
if isPlayAni == true then if isPlayAni == true then
self.cor_init_poker = self.cor_init_poker =
coroutine.start( coroutine.start(
@ -115,16 +223,18 @@ function M:InitPoker(pokerList, isPlayAni, open)
end end
table.sort(pokerList) table.sort(pokerList)
for i = 1, #pokerList do for i = #pokerList, 1, -1 do
local card_number_code = self:ChangeOneCodeByFrom(pokerList[i]) local card_number_code = self:ChangeOneCodeByFrom(pokerList[i])
local card_flower_code = pokerList[i] local card_flower_code = pokerList[i]
local btn_card = self:CreatPoker(card_number_code, cs, open) -- local btn_card = self:CreatPoker(card_number_code, cs, open)
local x, y = self._view.width / 2 + 100, -200 local btn_card = self._view_handCard:AddItemFromPool()
btn_card:SetXY(x, y) 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.alpha = 0
btn_card.touchable = false btn_card.touchable = false
-- coroutine.wait(0.05) -- coroutine.wait(0.05)
self.cards_view:AddChild(btn_card) -- self.cards_view:AddChild(btn_card)
local card_view = NewCardView(btn_card, card_number_code, card_flower_code) local card_view = NewCardView(btn_card, card_number_code, card_flower_code)
self.card_list[#self.card_list + 1] = card_view self.card_list[#self.card_list + 1] = card_view
@ -145,7 +255,7 @@ function M:InitPoker(pokerList, isPlayAni, open)
-- ViewUtil.PlaySound('RunFastNew_PK', 'extend/poker/runfast/sound/mopai.mp3') -- ViewUtil.PlaySound('RunFastNew_PK', 'extend/poker/runfast/sound/mopai.mp3')
local card_view = self.card_list[j] local card_view = self.card_list[j]
card_view.index = j card_view.index = j
self.cards_view:SetChildIndex(card_view.btn_card, card_view.index - 1) -- 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) card_view.btn_card:TweenMove(self:GetHandCardPos(j, #self.card_list), 0.10)
DSTween.To( DSTween.To(
@ -174,20 +284,21 @@ function M:InitPoker(pokerList, isPlayAni, open)
end end
) )
else else
for i = 1, #pokerList do for i = #pokerList, 1, -1 do
local card_number_code = self:ChangeOneCodeByFrom(pokerList[i]) local card_number_code = self:ChangeOneCodeByFrom(pokerList[i])
local card_flower_code = pokerList[i] local card_flower_code = pokerList[i]
local btn_card = self:CreatPoker(card_number_code, cs, open) local btn_card = self._view_handCard:AddItemFromPool()
self.cards_view:AddChild(btn_card) self:FillPoker(btn_card, "", card_number_code)
-- self.cards_view:AddChild(btn_card)
local card_view = NewCardView(btn_card, card_number_code, card_flower_code) local card_view = NewCardView(btn_card, card_number_code, card_flower_code)
self.card_list[#self.card_list + 1] = card_view self.card_list[#self.card_list + 1] = card_view
end end
table.sort(self.card_list, tableSortNumber) table.sort(self.card_list, tableSortNumber)
for i = 1, #self.card_list do for i = 1, #self.card_list do
local card = self.card_list[i] local card = self.card_list[i]
card.index = i -- card.index = i
self.cards_view:SetChildIndex(card.btn_card, card.index - 1) -- self.cards_view:SetChildIndex(card.btn_card, card.index - 1)
card.btn_card.xy = self:GetHandCardPos(i, #self.card_list) -- card.btn_card.xy = self:GetHandCardPos(i, #self.card_list)
if open ~= 1 then if open ~= 1 then
-- body -- body
self:AddCardMoveEvent(card) self:AddCardMoveEvent(card)
@ -213,27 +324,40 @@ function M:AddCardMoveEvent(card)
if card.btn_card.touchable == false then if card.btn_card.touchable == false then
return return
end end
local xy = self.cards_view:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) local xy = self._view_handCard:GetChildAt(0):GlobalToLocal(Vector2.New(context.inputEvent.x,
if xy.y > -21 and xy.y < 316 then context.inputEvent.y))
-- if xy.y > -21 and xy.y < 316 then
self.touchBegin = xy self.touchBegin = xy
print("============lingmeng,oveendqian", self.touchBegin.x, self.touchBegin.y)
Stage.inst.onTouchMove:Add(self.touchMoveFun) Stage.inst.onTouchMove:Add(self.touchMoveFun)
--Stage.inst.onClick:Add(self.touchMoveFun) --Stage.inst.onClick:Add(self.touchMoveFun)
card.btn_card.onTouchEnd:Set( card.btn_card.onTouchEnd:Set(
function(context) function(context)
print("============lingmeng,oveend") local downCards = #self.card_list
local xy = local xy =
self.cards_view:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) self._view_handCard:GetChildAt(0):GlobalToLocal(Vector2.New(context.inputEvent.x, context
.inputEvent
.y))
print("============lingmeng,oveend", xy.x, xy.y)
Stage.inst.onTouchMove:Remove(self.touchMoveFun) Stage.inst.onTouchMove:Remove(self.touchMoveFun)
--Stage.inst.onClick:onTouchMove(self.touchMoveFun) --Stage.inst.onClick:onTouchMove(self.touchMoveFun)
-- if xy.y > -21 and xy.y < 316 then -- if xy.y > -21 and xy.y < 316 then
if true then local max_x
print("lingin") local min_x
if xy.x - self.touchBegin.x > 0 then if xy.x - self.touchBegin.x > 0 then
local max_x = xy.x max_x = xy.x
local min_x = self.touchBegin.x min_x = self.touchBegin.x
else
max_x = self.touchBegin.x
min_x = xy.x
end
for k = 1, #self.card_list do for k = 1, #self.card_list do
local card = self.card_list[k] local card = self.card_list[k]
print("lingmeng,oveend2", card.btn_card.x)
if not card.btn_card.selected then
downCards = downCards - 1
end
-- for i = 1, #self.card_list do -- for i = 1, #self.card_list do
-- local card = self.card_list[i] -- local card = self.card_list[i]
-- if card.btn_card.selected then -- if card.btn_card.selected then
@ -244,10 +368,30 @@ function M:AddCardMoveEvent(card)
if card.btn_card.touchable == true then if card.btn_card.touchable == true then
send_card[#send_card + 1] = card send_card[#send_card + 1] = card
self:SetBtnCardColor(card, 1) 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 k == #self.card_list then if k == #self.card_list then
if if
card.btn_card.x + self.card_width > min_x and card.btn_card.x < max_x and card.btn_card.x > min_x and card.btn_card.x < max_x and
card.card_isTouchable == 0 card.card_isTouchable == 0
then then
self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false)
@ -255,9 +399,7 @@ function M:AddCardMoveEvent(card)
end end
else else
if if
card.btn_card.x + card.btn_card.x > min_x and
(self.card_width + self:GetHandCardOffset(#self.card_list)) >
min_x and
card.btn_card.x < max_x and card.btn_card.x < max_x and
card.card_isTouchable == 0 card.card_isTouchable == 0
then then
@ -267,86 +409,89 @@ function M:AddCardMoveEvent(card)
end end
end end
end end
else
local max_x = self.touchBegin.x
local min_x = xy.x
-- self.send_card = {}
for k = 1, #self.card_list do
local card = self.card_list[k]
-- 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, 1)
---- print(vardump(card))
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
end
end
end
ViewUtil.PlaySound('RunFastNew_PK', 'extend/poker/runfast/sound/click.mp3') ViewUtil.PlaySound('RunFastNew_PK', 'extend/poker/runfast/sound/click.mp3')
else
print("lingout")
self.touchBegin = Vector2.New(0, 0)
for k = 1, #self.card_list do
local card = self.card_list[k]
if card.btn_card.touchable == true then
self:SetBtnCardColor(card, 1)
end
end
end
Stage.inst:ResetInputState() Stage.inst:ResetInputState()
card.btn_card.onTouchEnd:Set(nil) card.btn_card.onTouchEnd:Set(nil)
if not self._flag_xuan then if downCards == 0 then
self:zhizhanxuanpai() self:zhizhanxuanpai()
end end
end end
) )
else -- else
local button = card.btn_card -- local button = card.btn_card
button.onChanged:Add( -- button.onChanged:Add(
function() -- function()
-- body -- -- body
if card.btn_card.selected == true then -- if card.btn_card.selected == true then
self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) -- self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false)
else -- else
self:UpdateCardMove(card.btn_card, card.btn_card.selected, false) -- self:UpdateCardMove(card.btn_card, card.btn_card.selected, false)
end -- end
end -- end
) -- )
end -- end
end end
) )
end 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() --智障选牌 function M:zhizhanxuanpai() --智障选牌
print("lingmengxuan", #self.send_card)
-- body -- body
local temp_send_card = {} local temp_send_card = {}
for i = 1, #self.send_card do for i = 1, #self.send_card do
@ -357,144 +502,181 @@ function M:zhizhanxuanpai() --智障选牌
end end
local card_map, max_key = self:GetCardMapAndMaxKey(temp_send_card) local card_map, max_key = self:GetCardMapAndMaxKey(temp_send_card)
local list_ones = self:CheckOnes(card_map)
list_type1, touch_type1 = self:CheckPairs(card_map, 0, 8) if list_ones ~= nil and #list_ones > 0 then
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 for i = 1, #self.card_list do
self:UpdateCardMove(self.card_list[i].btn_card, false, false) self:UpdateCardMove(self.card_list[i].btn_card, false, false)
end end
for i = 1, #self.send_card do for i = 1, #self.send_card do
for j = 1, #temp_list do for j = 1, #list_ones do
if self.send_card[i] == temp_list[j] then if self.send_card[i] == list_ones[j][1] then
-- body -- body
self:UpdateCardMove(self.send_card[i].btn_card, true, false) self:UpdateCardMove(self.send_card[i].btn_card, true, false)
end end
end end
end end
self.xunpai = temp_list
else else
self.xunpai = {}
end end
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) function M:TouchMoving(context)
if self.cards_view == nil then if self._view_handCard == nil then
return return
end end
local send_card1 = {} local send_card1 = {}
local xy = self.cards_view:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) local xy = self._view_handCard:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y))
self.isTouching = true self.isTouching = true
local max_x
local min_x
if xy.x - self.touchBegin.x > 0 then -- 往右边滑 if xy.x - self.touchBegin.x > 0 then -- 往右边滑
local max_x = xy.x max_x = xy.x
local min_x = self.touchBegin.x min_x = self.touchBegin.x
for i = 1, #self.card_list do for i = 1, #self.card_list do
local card = self.card_list[i] local card = self.card_list[i]
if card.btn_card.touchable == false or card.card_isTouchable == 1 then if card.btn_card.touchable == false or card.card_isTouchable == 1 then
else else
if if
card.btn_card.x + (self.card_width + self:GetHandCardOffset(#self.card_list)) > min_x and card.btn_card.x + self._offset_x > min_x and
card.btn_card.x < max_x card.btn_card.x < max_x
then then
printlog("cccccccccccccc22222222222222") self:SetBtnCardColor(card, 1)
self:SetBtnCardColor(card, 0.8)
if #send_card1 == 0 then if #send_card1 == 0 then
-- body
send_card1[1] = card send_card1[1] = card
end end
for i = 1, #send_card1 do if send_card1[#send_card1] ~= card then
if send_card1[i] ~= card then
-- body
send_card1[#send_card1 + 1] = card send_card1[#send_card1 + 1] = card
end end
end
else else
-- self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) self:SetBtnCardColor(card, 0)
-- card.card_isTouchable = 1
-- ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3")
self:SetBtnCardColor(card, 1)
end end
end end
end end
elseif xy.x - self.touchBegin.x < 0 then -- 左边滑 elseif xy.x - self.touchBegin.x < 0 then -- 左边滑
local max_x = self.touchBegin.x max_x = self.touchBegin.x
local min_x = xy.x min_x = xy.x
for i = 1, #self.card_list do for i = 1, #self.card_list do
local card = self.card_list[i] local card = self.card_list[i]
if card.btn_card.touchable == false or card.card_isTouchable == 1 then if card.btn_card.touchable == false or card.card_isTouchable == 1 then
else else
if if
card.btn_card.x + (self.card_width + self:GetHandCardOffset(#self.card_list)) > min_x and card.btn_card.x + self._offset_x > min_x and
card.btn_card.x < max_x card.btn_card.x < max_x
then then
-- self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) self:SetBtnCardColor(card, 1)
-- card.card_isTouchable = 1
-- ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3")
self:SetBtnCardColor(card, 0.8)
if #send_card1 == 0 then if #send_card1 == 0 then
-- body
send_card1[1] = card send_card1[1] = card
end end
for i = 1, #send_card1 do if send_card1[#send_card1] ~= card then
if send_card1[i] ~= card then
-- body
send_card1[#send_card1 + 1] = card send_card1[#send_card1 + 1] = card
end end
end
else else
self:SetBtnCardColor(card, 1) self:SetBtnCardColor(card, 0)
end end
end end
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 self.send_card = send_card1
end end
function M:SetBtnCardColor(card, num) -- function M:SetBtnCardColor(card, num)
if -- if
card.btn_card:GetChildAt(0) ~= nil and card.btn_card:GetChildAt(0):GetChildAt(0) ~= nil and -- card.btn_card:GetChildAt(0) ~= nil and card.btn_card:GetChildAt(0):GetChildAt(0) ~= nil and
card.btn_card:GetChildAt(0):GetChildAt(0):GetChildAt(0) ~= nil -- card.btn_card:GetChildAt(0):GetChildAt(0):GetChildAt(0) ~= nil
then -- then
-- body -- -- body
card.btn_card:GetChildAt(0):GetChildAt(0):GetChildAt(0).color = Color(num, num, num) -- card.btn_card:GetChildAt(0):GetChildAt(0):GetChildAt(0).color = Color(num, num, num)
end
--if card.card_code_flower < 500 then
-- card.btn_card:GetChildAt(0):GetChildAt(2).color = Color(num,num,num)
-- card.btn_card:GetChildAt(0):GetChildAt(3).color = Color(num,num,num)
-- end -- end
-- --if card.card_code_flower < 500 then
-- -- card.btn_card:GetChildAt(0):GetChildAt(2).color = Color(num,num,num)
-- -- card.btn_card:GetChildAt(0):GetChildAt(3).color = Color(num,num,num)
-- --end
-- end
function M:SetBtnCardColor(card, num)
card.btn_card:GetController('choose').selectedIndex = num
end end
function M:ShowPiao(piao) function M:ShowPiao(piao)
@ -569,7 +751,7 @@ function M:SetOutCardInfo(cardlist, isPass, isAnim)
local card_view = self.card_list[i] local card_view = self.card_list[i]
card_view.btn_card.touchable = true card_view.btn_card.touchable = true
self:UpdateCardMove(card_view.btn_card, false, false) self:UpdateCardMove(card_view.btn_card, false, false)
self:SetBtnCardColor(card_view, 1) self:SetBtnCardColor(card_view, 0)
end end
else else
self.ctr_outpoker.selectedIndex = 0 self.ctr_outpoker.selectedIndex = 0
@ -718,7 +900,7 @@ function M:UpdateHandCardsPos()
--card_view.btn_card.xy = self:GetHandCardPos(i, #self.card_list) --card_view.btn_card.xy = self:GetHandCardPos(i, #self.card_list)
card_view.btn_card:TweenMove(self:GetHandCardPos(i, #self.card_list), 0.1) card_view.btn_card:TweenMove(self:GetHandCardPos(i, #self.card_list), 0.1)
self:UpdateCardMove(card_view.btn_card, false, false) self:UpdateCardMove(card_view.btn_card, false, false)
self:SetBtnCardColor(card_view, 1) self:SetBtnCardColor(card_view, 0)
end end
end end
@ -734,14 +916,14 @@ end
function M:UpdateCardMove(btn_card, isSelected, isPlay) function M:UpdateCardMove(btn_card, isSelected, isPlay)
btn_card.selected = isSelected btn_card.selected = isSelected
local card_Move = btn_card:GetChildAt(0) -- local card_Move = btn_card
local xy = isSelected == true and Vector2.New(0, -30) or Vector2.New(0, 0) -- local xy = isSelected == true and Vector2.New(0, -65) or Vector2.New(0, 0)
if isPlay then -- if isPlay then
-- body -- -- body
card_Move:TweenMove(xy, 0) -- card_Move:TweenMove(xy, 0)
else -- else
card_Move:TweenMove(xy, 0) -- card_Move:TweenMove(xy, 0)
end -- end
end end
-- --
@ -755,14 +937,18 @@ end
function M:BtnEvent() function M:BtnEvent()
self.btn_not_put = self._view:GetChild('btn_not_put') self.btn_not_put = self._view:GetChild('btn_not_put')
self.btn_tips = self._view:GetChild('btn_tips') self.btn_tips = self._view:GetChild('Btn_Tip') -- 覆盖
self.btn_put = self._view:GetChild('btn_put') self.btn_sendCards = self._view:GetChild('Btn_SendCard')
self._ctr_canSendCard = self.btn_sendCards:GetController('can')
self.btn_put.onClick:Set( self.btn_sendCards.onClick:Set(
function() function()
if self.Reset then if self.Reset then
return return
end end
if self._ctr_canSendCard.selectedIndex == 0 then
return
end
local send_card = {} local send_card = {}
self.send_card = {} self.send_card = {}
local currentCard = {} local currentCard = {}
@ -1275,50 +1461,77 @@ function M:GetCardMapAndMaxKey(pokerList)
return map, max_key return map, max_key
end end
function M:CheckOnes(pokerMap, num, length) -- function M:CheckOnes(pokerMap, num, length)
local one_card_list = {} -- local one_card_list = {}
local touch_key_list = {} -- local touch_key_list = {}
local text = {} -- local text = {}
local text2 = {} -- local text2 = {}
local x = 0 -- local x = 0
if #self.card_list < length then -- if #self.card_list < length then
return one_card_list, touch_key_list -- return one_card_list, touch_key_list
end -- end
for k, v in pairs(pokerMap) do -- for k, v in pairs(pokerMap) do
text = {} -- text = {}
text2 = {} -- text2 = {}
if k > num then -- if k > num then
for l, p in pairs(pokerMap) do -- for l, p in pairs(pokerMap) do
for i = 0, length - 1 do -- for i = 0, length - 1 do
if l == k + i and l ~= 15 and l ~= 16 then -- if l == k + i and l ~= 15 and l ~= 16 then
-- body -- -- body
text[#text + 1] = { p[1] } -- text[#text + 1] = { p[1] }
text2[#text2 + 1] = l -- text2[#text2 + 1] = l
if #text >= length then -- if #text >= length then
-- body -- -- body
local x = #one_card_list -- local x = #one_card_list
local y = #touch_key_list -- local y = #touch_key_list
for i = 1, #text - 1 do -- for i = 1, #text - 1 do
one_card_list[x + 1] = text[1] -- one_card_list[x + 1] = text[1]
touch_key_list[y + 1] = text2[2] -- touch_key_list[y + 1] = text2[2]
-- for i, v in pairs(text2[i + 1]) do -- -- for i, v in pairs(text2[i + 1]) do
-- -- if v ~= nil then
-- -- table.insert(touch_key_list[x + 1], v)
-- -- end
-- -- end
-- for i, v in pairs(text[i + 1]) do
-- if v ~= nil then -- if v ~= nil then
-- table.insert(touch_key_list[x + 1], v) -- table.insert(one_card_list[x + 1], v)
-- end -- end
-- end -- end
for i, v in pairs(text[i + 1]) do -- end
if v ~= nil then -- end
table.insert(one_card_list[x + 1], v) -- end
-- end
-- end
-- end
-- end
-- return one_card_list, touch_key_list, length
-- end
function M:CheckOnes(pokerMap)
local one_card_list = {}
local old_k = 0
for k, v in pairs(pokerMap) do
if #one_card_list == 0 then
table.insert(one_card_list, v)
old_k = k
else
if k == 15 then
break
end
if k ~= old_k + 1 and #one_card_list >= 5 then
break
end
if k ~= old_k + 1 then
one_card_list = {}
end
table.insert(one_card_list, v)
old_k = k
end end
end end
if #one_card_list < 5 then
one_card_list = {}
end end
end return one_card_list
end
end
end
end
end
return one_card_list, touch_key_list, length
end end
function M:Clear() function M:Clear()
@ -1326,14 +1539,14 @@ function M:Clear()
self:SetOutCardInfo(nil, false) self:SetOutCardInfo(nil, false)
self.card_list = {} self.card_list = {}
self.out_card_list = {} self.out_card_list = {}
self.cards_view:RemoveChildren(0, -1, true) self._view_handCard:RemoveChildren(0, -1, true)
-- self.mask_liangpai:RemoveChildren(0,-1,true) -- self.mask_liangpai:RemoveChildren(0,-1,true)
end end
function M:ClearCheck() function M:ClearCheck()
self.card_list = {} self.card_list = {}
self.out_card_list = {} self.out_card_list = {}
self.cards_view:RemoveChildren(0, -1, true) self._view_handCard:RemoveChildren(0, -1, true)
end end
function M:Destroy() function M:Destroy()

View File

@ -4,49 +4,54 @@ local M = RunFast_RightPanelView
local function __init(self, mainView, view) local function __init(self, mainView, view)
local right_panel = view local right_panel = view
local btn_setting = right_panel:GetChild("btn_setting") local btn_setting = mainView._view:GetChild("Btn_Setting")
btn_setting.onClick:Set(function() btn_setting.onClick:Set(function()
print("lingmengmainview", mainView.dismiss_room_cd_time)
local _settingView = mainView:NewSettingView() local _settingView = mainView:NewSettingView()
_settingView.stateIndex = (mainView._room.curren_round >= 1 and mainView._allow_dissmiss) and 2 or 1
_settingView.cd_time = mainView.dismiss_room_cd_time
_settingView:Show() _settingView:Show()
end)
-- btn_setting.onClick:Set(function()
-- local _settingView = mainView:NewSettingView()
-- _settingView.stateIndex = (mainView._room.curren_round >= 1 and mainView._allow_dissmiss) and 2 or 1
-- _settingView.cd_time = mainView.dismiss_room_cd_time
-- _settingView:Show()
local room = DataManager.CurrenRoom -- local room = DataManager.CurrenRoom
_settingView.onCallback:Add(function(context) -- _settingView.onCallback:Add(function(context)
local _gamectr = ControllerManager.GetController(GameController) -- local _gamectr = ControllerManager.GetController(GameController)
if (room.CurnrenState == StateType.Ready) then -- if (room.CurnrenState == StateType.Ready) then
_gamectr:LevelRoom(function(response) -- _gamectr:LevelRoom(function(response)
if (response.ReturnCode == 0) then -- if (response.ReturnCode == 0) then
ViewManager.ChangeView(ViewManager.View_Lobby) -- ViewManager.ChangeView(ViewManager.View_Lobby)
GameApplication.Instance:ShowTips("房间已解散!") -- GameApplication.Instance:ShowTips("房间已解散!")
end -- end
end) -- end)
else -- else
-- print("mainView.dismiss_room_cd_time"..mainView.dismiss_room_cd_time) -- -- print("mainView.dismiss_room_cd_time"..mainView.dismiss_room_cd_time)
if mainView.dismiss_room_cd_time > 0 then -- if mainView.dismiss_room_cd_time > 0 then
GameApplication.Instance:ShowTips("您还处于解散冷却时间当中,请稍后重试!") -- GameApplication.Instance:ShowTips("您还处于解散冷却时间当中,请稍后重试!")
else -- else
_gamectr:AskDismissRoom() -- _gamectr:AskDismissRoom()
end -- end
end -- end
end) -- end)
end) -- end)
self._tex_data = right_panel:GetChild("tex_data") -- self._tex_data = right_panel:GetChild("tex_data")
self._tex_time = right_panel:GetChild("tex_time") self._tex_time = mainView._view:GetChild("Text_Time")
self._pb_batteryLevel = right_panel:GetChild("pb_batteryLevel") self._pb_batteryLevel = mainView._view:GetChild("PB_Battery")
self._xinhao = right_panel:GetController("xinhao") -- self._xinhao = right_panel:GetController("xinhao")
self.ctr_xh = right_panel:GetChild("gcm_xinhao"):GetController("c1") -- self.ctr_xh = right_panel:GetChild("gcm_xinhao"):GetController("c1")
self.ctr_wifi = right_panel:GetChild("gcm_wifi"):GetController("c1") -- self.ctr_wifi = right_panel:GetChild("gcm_wifi"):GetController("c1")
self._tex_ping = right_panel:GetChild("gcm_xinhao"):GetChild("n7") -- self._tex_ping = right_panel:GetChild("gcm_xinhao"):GetChild("n7")
self.ctr_log = right_panel:GetController("log") -- self.ctr_log = right_panel:GetController("log")
local btn_log = right_panel:GetChild("btn_log") -- local btn_log = right_panel:GetChild("btn_log")
btn_log.onClick:Set(function() -- btn_log.onClick:Set(function()
if self.onLogCallback then -- if self.onLogCallback then
self.onLogCallback() -- self.onLogCallback()
end -- end
end) -- end)
self._total_time = 0 self._total_time = 0
self:__UpdateTime() self:__UpdateTime()
@ -63,27 +68,27 @@ function RunFast_RightPanelView.new(mainView, view)
end end
function M:__UpdateTime() function M:__UpdateTime()
self._tex_data.text = os.date("%Y-%m-%d") -- self._tex_data.text = os.date("%Y-%m-%d")
self._tex_time.text = os.date("%H:%M") self._tex_time.text = os.date("%H:%M")
if Application.platform == RuntimePlatform.IPhonePlayer or Application.platform == RuntimePlatform.Android then if Application.platform == RuntimePlatform.IPhonePlayer or Application.platform == RuntimePlatform.Android then
self._pb_batteryLevel.value = GameApplication.Instance:GetBatteryLevel() self._pb_batteryLevel.value = GameApplication.Instance:GetBatteryLevel()
end end
local NetworkReachability = UnityEngine.NetworkReachability -- local NetworkReachability = UnityEngine.NetworkReachability
local _client = ControllerManager.GameNetClinet -- local _client = ControllerManager.GameNetClinet
if not _client then return end -- if not _client then return end
local ping = _client:getAveragePingTime() -- local ping = _client:getAveragePingTime()
if not ping then return end -- if not ping then return end
ping = math.floor(ping / 2) -- ping = math.floor(ping / 2)
if ping > 300 then ping = 300 end -- if ping > 300 then ping = 300 end
if ping <= 100 then -- if ping <= 100 then
self.ctr_xh.selectedIndex = 0 -- self.ctr_xh.selectedIndex = 0
elseif ping <= 300 then -- elseif ping <= 300 then
self.ctr_xh.selectedIndex = 1 -- self.ctr_xh.selectedIndex = 1
else -- else
self.ctr_xh.selectedIndex = 2 -- self.ctr_xh.selectedIndex = 2
end -- end
self._tex_ping.text = ping .. "ms" -- self._tex_ping.text = ping .. "ms"
end end
return M return M

View File

@ -25,45 +25,47 @@ function M:InitView(url, isHideIpAdds, settingViewType, ex_defaultbg, ex_bgconfi
local bg_config = ex_bgconfig or pk_bg_config local bg_config = ex_bgconfig or pk_bg_config
-- 设置界面初始化方法 -- 设置界面初始化方法
self.NewSettingView = function(self) self.NewSettingView = function(self)
-- 根据settingViewType和self._state判断界面按钮功能显示 -- -- 根据settingViewType和self._state判断界面按钮功能显示
local stype = 0 -- local stype = 0
local room = DataManager.CurrenRoom -- local room = DataManager.CurrenRoom
local ispanguangzhe = room.self_player.seat == 0 -- local ispanguangzhe = room.self_player.seat == 0
if self._state.selectedIndex == 3 then -- if self._state.selectedIndex == 3 then
stype = 0 -- stype = 0
elseif settingViewType < 2 then -- elseif settingViewType < 2 then
stype = settingViewType -- stype = settingViewType
elseif settingViewType == 2 then -- elseif settingViewType == 2 then
if (ispanguangzhe or self._state.selectedIndex == 0) then -- if (ispanguangzhe or self._state.selectedIndex == 0) then
stype = 2 -- stype = 2
else -- else
stype = 3 -- stype = 3
end -- end
elseif settingViewType == 3 then -- elseif settingViewType == 3 then
if not ispanguangzhe and self._state.selectedIndex > 0 then -- if not ispanguangzhe and self._state.selectedIndex > 0 then
stype = 3 -- stype = 3
else -- else
stype = 2 -- stype = 2
end -- end
end--self._root_view -- end--self._root_view
local settingView = PKSettingView.new(self._root_view, stype, isHideJiesan, settingUrl,handler(self, self.UpdateCardSize)) print("lingmengmainview2", self.dismiss_room_cd_time)
local settingView = PKSettingView.new(self, 0, isHideJiesan, settingUrl,
handler(self, self.UpdateCardSize))
-- 获取MainView界面state控制器选项 -- 获取MainView界面state控制器选项
settingView.__checkMainViewState = function() -- settingView.__checkMainViewState = function()
return self._state.selectedIndex -- return self._state.selectedIndex
end -- end
-- 设置界面换牌功能回调 -- -- 设置界面换牌功能回调
if settingViewType == 1 then -- if settingViewType == 1 then
settingView.__changePokerCallBack = handler(self, self.UpdateCard) -- settingView.__changePokerCallBack = handler(self, self.UpdateCard)
settingView.__changePokerSizeCallBack = handler(self, self.UpdateCardSize) -- settingView.__changePokerSizeCallBack = handler(self, self.UpdateCardSize)
end -- end
settingView:FillBgSection( -- settingView:FillBgSection(
function(url) -- function(url)
LoadGameBg(url, self._root_view) -- LoadGameBg(url, self._root_view)
end, -- end,
self._room.game_id, -- self._room.game_id,
default_bg, -- default_bg,
bg_config -- bg_config
) -- )
return settingView return settingView
end end
@ -77,7 +79,6 @@ function M:InitView(url, isHideIpAdds, settingViewType, ex_defaultbg, ex_bgconfi
self:InitXiPai1() self:InitXiPai1()
end end
function M:InitXiPai() function M:InitXiPai()
self._xipaiPanel = UIPackage.CreateObjectFromURL("ui://Common/panel_handPoke") self._xipaiPanel = UIPackage.CreateObjectFromURL("ui://Common/panel_handPoke")
self._root_view:AddChild(self._xipaiPanel) self._root_view:AddChild(self._xipaiPanel)
@ -107,8 +108,6 @@ function M:PlayXiPai(xipaiCallBack)
xipaiCallBack() xipaiCallBack()
end end
end) end)
end end
end end
@ -125,7 +124,6 @@ function M:InitXiPai1()
self._xipaiPanel1.visible = false self._xipaiPanel1.visible = false
self._handAnimCtr1 = self._xipaiPanel1:GetController("anim") self._handAnimCtr1 = self._xipaiPanel1:GetController("anim")
self._handAnimCtr1.selectedIndex = 0 self._handAnimCtr1.selectedIndex = 0
end end
function M:PlayXiPai1(xipaiCallBack) function M:PlayXiPai1(xipaiCallBack)
@ -141,12 +139,9 @@ function M:PlayXiPai1(xipaiCallBack)
xipaiCallBack() xipaiCallBack()
end end
end) end)
end end
end end
-- 设置界面的换牌回调,需要换牌的玩法settingViewType传1,重写这个方法 -- 设置界面的换牌回调,需要换牌的玩法settingViewType传1,重写这个方法
function M:UpdateCard(index) function M:UpdateCard(index)
end end

View File

@ -18,8 +18,6 @@ function PKSettingView.new(blur_view, show_type, isjiesan,url,cardSizeHandle)
self.stateIndex = 0 self.stateIndex = 0
self.cd_time = 0 self.cd_time = 0
self._btn_dismiss_room_enable = true self._btn_dismiss_room_enable = true
self._full = true
self._anim_pop = 2
self._close_destroy = true self._close_destroy = true
self._show_type = show_type self._show_type = show_type
self.isjiesan = isjiesan self.isjiesan = isjiesan
@ -27,7 +25,7 @@ function PKSettingView.new(blur_view, show_type, isjiesan,url,cardSizeHandle)
if url ~= nil then if url ~= nil then
self:init(url) self:init(url)
else else
self:init('ui://Main_Poker/SettingWindow1') self:init('ui://Main_Poker/Setting')
end end
return self return self
@ -35,81 +33,81 @@ end
function M:init(url) function M:init(url)
SettingView.init(self, url) SettingView.init(self, url)
-- show_type:1隐藏所有 2隐藏解散和换牌 3隐藏返回和换牌 -- -- show_type:1隐藏所有 2隐藏解散和换牌 3隐藏返回和换牌
-- 设置界面有换牌功能的需要在mainview中重写方法UpdateCard -- -- 设置界面有换牌功能的需要在mainview中重写方法UpdateCard
self._view:GetController('type').selectedIndex = self._show_type -- self._view:GetController('type').selectedIndex = self._show_type
-- show_type1玩法的换牌功能 -- -- show_type1玩法的换牌功能
if self._show_type == 1 then -- if self._show_type == 1 then
local room = DataManager.CurrenRoom -- local room = DataManager.CurrenRoom
local c1 = self._view:GetController('paimian') -- local c1 = self._view:GetController('paimian')
local user_id = DataManager.SelfUser.account_id -- local user_id = DataManager.SelfUser.account_id
local json_data = Utils.LoadLocalFile(user_id .. room.game_id .. 'pai') -- local json_data = Utils.LoadLocalFile(user_id .. room.game_id .. 'pai')
if json_data == nil then -- if json_data == nil then
local _gamectr = self._gamectr -- local _gamectr = self._gamectr
c1.selectedIndex = 0 -- c1.selectedIndex = 0
else -- else
local _data = json.decode(json_data) -- local _data = json.decode(json_data)
local pai = _data['pai'] -- local pai = _data['pai']
c1.selectedIndex = pai -- c1.selectedIndex = pai
end -- end
c1.onChanged:Set( -- c1.onChanged:Set(
function() -- function()
if self.__changePokerCallBack then -- if self.__changePokerCallBack then
self.__changePokerCallBack(c1.selectedIndex) -- self.__changePokerCallBack(c1.selectedIndex)
end -- end
--点击换牌按钮后保存当前游戏的牌 -- --点击换牌按钮后保存当前游戏的牌
local user_id = DataManager.SelfUser.account_id -- local user_id = DataManager.SelfUser.account_id
local _data = {} -- local _data = {}
_data['pai'] = c1.selectedIndex -- _data['pai'] = c1.selectedIndex
local key = user_id .. room.game_id .. 'pai' -- local key = user_id .. room.game_id .. 'pai'
Utils.SaveLocalFile(key, json.encode(_data)) -- Utils.SaveLocalFile(key, json.encode(_data))
end -- end
) -- )
local card_size = self._view:GetController('card_size') -- local card_size = self._view:GetController('card_size')
json_data = Utils.LoadLocalFile(user_id .. room.game_id .. 'cardsize') -- json_data = Utils.LoadLocalFile(user_id .. room.game_id .. 'cardsize')
if json_data == nil then -- if json_data == nil then
local _gamectr = self._gamectr -- local _gamectr = self._gamectr
card_size.selectedIndex = 1 -- card_size.selectedIndex = 1
else -- else
local _data = json.decode(json_data) -- local _data = json.decode(json_data)
local cardsize = _data['cardsize'] -- local cardsize = _data['cardsize']
card_size.selectedIndex = cardsize -- card_size.selectedIndex = cardsize
-- end
-- card_size.onChanged:Set(
-- function()
-- if self.__changePokerSizeCallBack then
-- self.__changePokerSizeCallBack(card_size.selectedIndex)
-- end
-- --点击换牌按钮后保存当前游戏的牌
-- local user_id = DataManager.SelfUser.account_id
-- local _data = {}
-- _data['cardsize'] = card_size.selectedIndex
-- local key = user_id .. room.game_id .. 'cardsize'
-- Utils.SaveLocalFile(key, json.encode(_data))
-- end
-- )
-- self._view:GetChild('btn_close').onClick:Add(
-- function(...)
-- self:Destroy()
-- end
-- )
-- end
-- if self.isjiesan then
-- self._view:GetChild('n82').visible = false
-- end
end end
card_size.onChanged:Set( -- function M:Show()
function() -- SettingView.Show(self)
if self.__changePokerSizeCallBack then -- -- self:showSettingOption()
self.__changePokerSizeCallBack(card_size.selectedIndex) -- end
end
--点击换牌按钮后保存当前游戏的牌
local user_id = DataManager.SelfUser.account_id
local _data = {}
_data['cardsize'] = card_size.selectedIndex
local key = user_id .. room.game_id .. 'cardsize'
Utils.SaveLocalFile(key, json.encode(_data))
end
)
self._view:GetChild('btn_close').onClick:Add(
function(...)
self:Destroy()
end
)
end
if self.isjiesan then
self._view:GetChild('n82').visible = false
end
end
function M:Show()
SettingView.Show(self)
self:showSettingOption()
end
-- 显示设置界面按钮 -- 显示设置界面按钮
function M:showSettingOption() function M:showSettingOption()
@ -126,7 +124,8 @@ function M:showSettingOption()
tipStr = '您是否返回?' tipStr = '您是否返回?'
else else
tipStr = tipStr =
(not ispanguangzhe and room.owner_id == room.self_player.self_user.account_id) and tip_owner or tip (not ispanguangzhe and room.owner_id == room.self_player.self_user.account_id) and tip_owner or
tip
end end
local _curren_msg = MsgWindow.new(self._root_view, tipStr, MsgWindow.MsgMode.OkAndCancel) local _curren_msg = MsgWindow.new(self._root_view, tipStr, MsgWindow.MsgMode.OkAndCancel)
_curren_msg.onOk:Add( _curren_msg.onOk:Add(

Binary file not shown.

Before

Width:  |  Height:  |  Size: 383 KiB

After

Width:  |  Height:  |  Size: 830 KiB

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: extend/majiang/nancheng/60d044d2ede2d00358b3d465fc27d91c assetBundleName: extend/majiang/fuzhou/143f50c5d0c94116a44a429d70b0a503
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: extend/majiang/nancheng/2e4412a0aeb9e7e81c153e616ebf7517 assetBundleName: extend/majiang/fuzhou/8a00447165e310f36e0e125819ebe700
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: extend/majiang/nancheng/3e2e653e8e4c54e5e3c213f7564eea03 assetBundleName: extend/majiang/fuzhou/7d33098e589ad9161e842a8292e25c78
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: extend/majiang/nancheng/4204d0c24664f759d226d34f9ebdc855 assetBundleName: extend/majiang/fuzhou/861415771f787e77dc9453065b00e6d6
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: extend/majiang/nancheng/60d044d2ede2d00358b3d465fc27d91c assetBundleName: extend/majiang/jinxi/fba3526298175981ac5d29d08e840727
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: extend/majiang/nancheng/2e4412a0aeb9e7e81c153e616ebf7517 assetBundleName: extend/majiang/jinxi/58b3df84563a1dd87dd55f9b006274e9
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: extend/majiang/nancheng/3e2e653e8e4c54e5e3c213f7564eea03 assetBundleName: extend/majiang/jinxi/04e9a1552198f2034d27ac357e9d1ce8
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: extend/majiang/nancheng/4204d0c24664f759d226d34f9ebdc855 assetBundleName: extend/majiang/jinxi/c173327a7ddb03ead437be3ac18fc9a2
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: extend/majiang/nancheng/60d044d2ede2d00358b3d465fc27d91c assetBundleName: extend/majiang/lichuan/dc5335c695388dff648f1f225930d208
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: extend/majiang/nancheng/2e4412a0aeb9e7e81c153e616ebf7517 assetBundleName: extend/majiang/lichuan/7d3241d233526a760e34ea6e58148ec5
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: extend/majiang/nancheng/3e2e653e8e4c54e5e3c213f7564eea03 assetBundleName: extend/majiang/lichuan/f30e23fd02f9df5bfbc0e7a4cbf097e8
assetBundleVariant: assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0 pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: extend/majiang/nancheng/4204d0c24664f759d226d34f9ebdc855 assetBundleName: extend/majiang/lichuan/76c792958c0fb52a719b494b891becc2
assetBundleVariant: assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 KiB

View File

@ -0,0 +1,92 @@
fileFormatVersion: 2
guid: 5f0b77697a4278740ac660cc15fc7093
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 KiB

View File

@ -0,0 +1,92 @@
fileFormatVersion: 2
guid: c002d66f43db6904e929d848f0cef936
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

View File

@ -0,0 +1,92 @@
fileFormatVersion: 2
guid: 66822772de1689e46bd98f43c3bd664d
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

View File

@ -0,0 +1,92 @@
fileFormatVersion: 2
guid: 82331c6960a876a4fb4f2c28474d7c65
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 2.3 MiB