跑得快修正中
|
|
@ -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')
|
||||||
btn_ready.onClick:Set(function()
|
if btn_ready ~= nil then
|
||||||
self._gamectr:PlayerReady()
|
btn_ready.onClick:Set(function()
|
||||||
end)
|
self._gamectr:PlayerReady()
|
||||||
|
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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,10 @@ local TableBG = import 'Game.Data.TableBG'
|
||||||
local SettingView = {}
|
local SettingView = {}
|
||||||
|
|
||||||
local M = SettingView
|
local M = SettingView
|
||||||
setmetatable(M, {__index = BaseWindow})
|
setmetatable(M, { __index = BaseWindow })
|
||||||
|
|
||||||
function SettingView.new(blur_view)
|
function SettingView.new(blur_view)
|
||||||
local self = setmetatable({}, {__index = M})
|
local self = setmetatable({}, { __index = M })
|
||||||
self.class = 'SettingView'
|
self.class = 'SettingView'
|
||||||
self._currenIndex = 0
|
self._currenIndex = 0
|
||||||
self._blur_view = blur_view
|
self._blur_view = blur_view
|
||||||
|
|
@ -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_sound.value = GameApplication.Instance.SoundValue
|
-- slider_music.value = GameApplication.Instance.MusicValue
|
||||||
slider_music.value = GameApplication.Instance.MusicValue
|
|
||||||
-- btn_sound.selected = GameApplication.Instance.SoundValue < 5 and false or true
|
|
||||||
|
|
||||||
slider_music.onChanged:Add(
|
slider_music.onChanged:Add(function()
|
||||||
function()
|
-- GameApplication.Instance.MusicValue = slider_music.value
|
||||||
GameApplication.Instance.MusicValue = slider_music.value
|
-- btn_music.selected = false
|
||||||
-- btn_music.selected = GameApplication.Instance.MusicValue < 5 and false or true
|
-- GameApplication.Instance.MusicMute = false;
|
||||||
|
end)
|
||||||
|
|
||||||
|
slider_sound.onChanged:Add(function()
|
||||||
|
-- GameApplication.Instance.SoundValue = slider_sound.value
|
||||||
|
-- btn_sound.selected = false
|
||||||
|
-- GameApplication.Instance.SoundMute = false;
|
||||||
|
end)
|
||||||
|
|
||||||
|
btn_sound.onClick:Add(function()
|
||||||
|
-- GameApplication.Instance.SoundMute = btn_sound.selected;
|
||||||
|
end)
|
||||||
|
|
||||||
|
btn_music.onClick:Add(function()
|
||||||
|
-- GameApplication.Instance.MusicMute = btn_music.selected;
|
||||||
|
end)
|
||||||
|
|
||||||
|
local _btn_logout = self._view:GetChild('btn_closeRoom')
|
||||||
|
_btn_logout.onClick:Set(function()
|
||||||
|
if self._blur_view.dismiss_room_cd_time > 0 then
|
||||||
|
ViewUtil.ErrorTip(nil, "您还处于解散冷却时间当中,请稍后重试!")
|
||||||
|
else
|
||||||
|
local _gamectr = ControllerManager.GetController(GameController)
|
||||||
|
_gamectr:AskDismissRoom()
|
||||||
end
|
end
|
||||||
)
|
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
|
|
||||||
-- end
|
|
||||||
-- )
|
|
||||||
|
|
||||||
-- btn_music.onChanged:Add(
|
|
||||||
-- function()
|
|
||||||
-- GameApplication.Instance.MusicValue = btn_music.selected and 50 or 0
|
|
||||||
-- slider_music.value = GameApplication.Instance.MusicValue
|
|
||||||
-- end
|
|
||||||
-- )
|
|
||||||
|
|
||||||
self._stateController = view:GetController('state')
|
|
||||||
self.cd_time_text = view:GetChild('n35')
|
|
||||||
|
|
||||||
local _btn_quit = view:GetChild('btn_quit')
|
|
||||||
if _btn_quit then
|
|
||||||
_btn_quit.onClick:Set(
|
|
||||||
function()
|
|
||||||
local _curren_msg = MsgWindow.new(self._root_view, '您是否退出游戏?', MsgWindow.MsgMode.OkAndCancel)
|
|
||||||
_curren_msg.onOk:Add(
|
|
||||||
function()
|
|
||||||
Application.Quit()
|
|
||||||
end
|
|
||||||
)
|
|
||||||
_curren_msg:Show()
|
|
||||||
end
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
local _btn_logout = view:GetChild('btn_logout')
|
|
||||||
if _btn_logout then
|
|
||||||
_btn_logout.onClick:Add(
|
|
||||||
function()
|
|
||||||
local _curren_msg = MsgWindow.new(self._root_view, '您是否退出当前账号?', MsgWindow.MsgMode.OkAndCancel)
|
|
||||||
_curren_msg.onOk:Add(
|
|
||||||
function()
|
|
||||||
PlayerPrefs.DeleteKey('session_id')
|
|
||||||
PlayerPrefs.Save()
|
|
||||||
RestartGame()
|
|
||||||
end
|
|
||||||
)
|
|
||||||
_curren_msg:Show()
|
|
||||||
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)
|
|
||||||
_gamectr:AskDismissRoom()
|
|
||||||
self:Destroy()
|
|
||||||
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
|
||||||
|
|
|
||||||
|
|
@ -1,36 +1,30 @@
|
||||||
local PlayerInfoView = require("Game.View.PlayerInfoView")
|
local PlayerInfoView = require("Game.View.PlayerInfoView_copy")
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
function M.new(view, mainView)
|
function M.new(view, mainView)
|
||||||
setmetatable(M, {__index = PlayerInfoView})
|
setmetatable(M, { __index = PlayerInfoView })
|
||||||
local self = setmetatable({}, {__index = M})
|
local self = setmetatable({}, { __index = M })
|
||||||
self._view = view
|
self._view = view
|
||||||
self._main_view = mainView
|
self._main_view = mainView
|
||||||
self:init()
|
self:init()
|
||||||
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
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
|
|
||||||
|
|
@ -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)
|
-- function M:InitPoker(pokerList, isPlayAni, open)
|
||||||
-- self.zhizhanctr_select=0
|
-- -- self.zhizhanctr_select=0
|
||||||
-- self.zhizhantype=0
|
-- -- self.zhizhantype=0
|
||||||
-- self.zhizhannumber=0
|
-- -- self.zhizhannumber=0
|
||||||
-- self.zhizhanlength=0
|
-- -- self.zhizhanlength=0
|
||||||
-- self.zhizhanmustPutMaxCard=0
|
-- -- self.zhizhanmustPutMaxCard=0
|
||||||
-- self.zhizhanplay=0
|
-- -- self.zhizhanplay=0
|
||||||
-- self.zhizhanzdts=0
|
-- -- self.zhizhanzdts=0
|
||||||
local cs = 1.25
|
-- local cs = 1.25
|
||||||
-- print("==========================DataManager.CurrenRoom.cardsize", DataManager.CurrenRoom.cardsize)
|
-- -- print("==========================DataManager.CurrenRoom.cardsize", DataManager.CurrenRoom.cardsize)
|
||||||
if DataManager.CurrenRoom.cardsize == 0 then
|
-- if DataManager.CurrenRoom.cardsize == 0 then
|
||||||
cs = 2.5
|
-- cs = 2.5
|
||||||
elseif DataManager.CurrenRoom.cardsize == 1 then
|
-- elseif DataManager.CurrenRoom.cardsize == 1 then
|
||||||
cs = 2
|
-- cs = 2
|
||||||
elseif DataManager.CurrenRoom.cardsize == 2 then
|
-- elseif DataManager.CurrenRoom.cardsize == 2 then
|
||||||
cs = 1.75
|
-- cs = 1.75
|
||||||
end
|
-- 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)
|
||||||
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,140 +324,174 @@ 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))
|
||||||
self.touchBegin = xy
|
-- if xy.y > -21 and xy.y < 316 then
|
||||||
Stage.inst.onTouchMove:Add(self.touchMoveFun)
|
self.touchBegin = xy
|
||||||
--Stage.inst.onClick:Add(self.touchMoveFun)
|
print("============lingmeng,oveendqian", self.touchBegin.x, self.touchBegin.y)
|
||||||
card.btn_card.onTouchEnd:Set(
|
Stage.inst.onTouchMove:Add(self.touchMoveFun)
|
||||||
function(context)
|
--Stage.inst.onClick:Add(self.touchMoveFun)
|
||||||
print("============lingmeng,oveend")
|
card.btn_card.onTouchEnd:Set(
|
||||||
local xy =
|
function(context)
|
||||||
self.cards_view:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y))
|
local downCards = #self.card_list
|
||||||
Stage.inst.onTouchMove:Remove(self.touchMoveFun)
|
local xy =
|
||||||
--Stage.inst.onClick:onTouchMove(self.touchMoveFun)
|
self._view_handCard:GetChildAt(0):GlobalToLocal(Vector2.New(context.inputEvent.x, context
|
||||||
-- if xy.y > -21 and xy.y < 316 then
|
.inputEvent
|
||||||
if true then
|
.y))
|
||||||
print("lingin")
|
print("============lingmeng,oveend", xy.x, xy.y)
|
||||||
if xy.x - self.touchBegin.x > 0 then
|
Stage.inst.onTouchMove:Remove(self.touchMoveFun)
|
||||||
local max_x = xy.x
|
--Stage.inst.onClick:onTouchMove(self.touchMoveFun)
|
||||||
local min_x = self.touchBegin.x
|
-- if xy.y > -21 and xy.y < 316 then
|
||||||
for k = 1, #self.card_list do
|
local max_x
|
||||||
local card = self.card_list[k]
|
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 i = 1, #self.card_list do
|
for k = 1, #self.card_list do
|
||||||
-- local card = self.card_list[i]
|
local card = self.card_list[k]
|
||||||
-- if card.btn_card.selected then
|
print("lingmeng,oveend2", card.btn_card.x)
|
||||||
-- send_card[#send_card + 1] = card.card_code_flower
|
if not card.btn_card.selected then
|
||||||
-- self.send_card[#self.send_card + 1] = card
|
downCards = downCards - 1
|
||||||
-- end
|
end
|
||||||
-- end
|
-- for i = 1, #self.card_list do
|
||||||
if card.btn_card.touchable == true then
|
-- local card = self.card_list[i]
|
||||||
send_card[#send_card + 1] = card
|
-- 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)
|
self:SetBtnCardColor(card, 0)
|
||||||
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 + self.card_width > 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)
|
||||||
--ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3")
|
-- --ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3")
|
||||||
end
|
-- end
|
||||||
else
|
-- else
|
||||||
if
|
-- if
|
||||||
card.btn_card.x +
|
-- card.btn_card.x +
|
||||||
(self.card_width + self:GetHandCardOffset(#self.card_list)) >
|
-- (self.card_width + self:GetHandCardOffset(#self.card_list)) >
|
||||||
min_x and
|
-- 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
|
||||||
self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false)
|
-- self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false)
|
||||||
--ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3")
|
-- --ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3")
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
end
|
if k == #self.card_list then
|
||||||
|
if
|
||||||
|
card.btn_card.x > 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
|
||||||
else
|
else
|
||||||
local max_x = self.touchBegin.x
|
if
|
||||||
local min_x = xy.x
|
card.btn_card.x > min_x and
|
||||||
-- self.send_card = {}
|
card.btn_card.x < max_x and
|
||||||
for k = 1, #self.card_list do
|
card.card_isTouchable == 0
|
||||||
local card = self.card_list[k]
|
then
|
||||||
|
self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false)
|
||||||
-- for i = 1, #self.card_list do
|
--ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3")
|
||||||
-- 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')
|
|
||||||
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
|
end
|
||||||
end
|
end
|
||||||
Stage.inst:ResetInputState()
|
end
|
||||||
card.btn_card.onTouchEnd:Set(nil)
|
|
||||||
|
|
||||||
if not self._flag_xuan then
|
ViewUtil.PlaySound('RunFastNew_PK', 'extend/poker/runfast/sound/click.mp3')
|
||||||
self:zhizhanxuanpai()
|
|
||||||
end
|
Stage.inst:ResetInputState()
|
||||||
|
card.btn_card.onTouchEnd:Set(nil)
|
||||||
|
|
||||||
|
if downCards == 0 then
|
||||||
|
self:zhizhanxuanpai()
|
||||||
end
|
end
|
||||||
)
|
end
|
||||||
else
|
)
|
||||||
local button = card.btn_card
|
-- else
|
||||||
button.onChanged:Add(
|
-- local button = card.btn_card
|
||||||
function()
|
-- button.onChanged:Add(
|
||||||
-- body
|
-- function()
|
||||||
if card.btn_card.selected == true then
|
-- -- body
|
||||||
self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false)
|
-- if card.btn_card.selected == true then
|
||||||
else
|
-- self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false)
|
||||||
self:UpdateCardMove(card.btn_card, card.btn_card.selected, false)
|
-- else
|
||||||
end
|
-- self:UpdateCardMove(card.btn_card, card.btn_card.selected, false)
|
||||||
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
|
send_card1[#send_card1 + 1] = card
|
||||||
-- body
|
|
||||||
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
|
send_card1[#send_card1 + 1] = card
|
||||||
-- body
|
|
||||||
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
|
-- end
|
||||||
|
|
||||||
--if card.card_code_flower < 500 then
|
-- --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(2).color = Color(num,num,num)
|
||||||
-- card.btn_card:GetChildAt(0):GetChildAt(3).color = Color(num,num,num)
|
-- -- card.btn_card:GetChildAt(0):GetChildAt(3).color = Color(num,num,num)
|
||||||
--end
|
-- --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 touch_key_list = {}
|
||||||
|
-- local text = {}
|
||||||
|
-- local text2 = {}
|
||||||
|
-- local x = 0
|
||||||
|
-- if #self.card_list < length then
|
||||||
|
-- return one_card_list, touch_key_list
|
||||||
|
-- end
|
||||||
|
-- for k, v in pairs(pokerMap) do
|
||||||
|
-- text = {}
|
||||||
|
-- text2 = {}
|
||||||
|
-- if k > num then
|
||||||
|
-- for l, p in pairs(pokerMap) do
|
||||||
|
-- for i = 0, length - 1 do
|
||||||
|
-- if l == k + i and l ~= 15 and l ~= 16 then
|
||||||
|
-- -- body
|
||||||
|
-- text[#text + 1] = { p[1] }
|
||||||
|
-- text2[#text2 + 1] = l
|
||||||
|
-- if #text >= length then
|
||||||
|
-- -- body
|
||||||
|
-- local x = #one_card_list
|
||||||
|
-- local y = #touch_key_list
|
||||||
|
-- for i = 1, #text - 1 do
|
||||||
|
-- one_card_list[x + 1] = text[1]
|
||||||
|
-- touch_key_list[y + 1] = text2[2]
|
||||||
|
-- -- 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
|
||||||
|
-- table.insert(one_card_list[x + 1], v)
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
-- return one_card_list, touch_key_list, length
|
||||||
|
-- end
|
||||||
|
|
||||||
|
function M:CheckOnes(pokerMap)
|
||||||
local one_card_list = {}
|
local one_card_list = {}
|
||||||
local touch_key_list = {}
|
local old_k = 0
|
||||||
local text = {}
|
|
||||||
local text2 = {}
|
|
||||||
local x = 0
|
|
||||||
if #self.card_list < length then
|
|
||||||
return one_card_list, touch_key_list
|
|
||||||
end
|
|
||||||
for k, v in pairs(pokerMap) do
|
for k, v in pairs(pokerMap) do
|
||||||
text = {}
|
if #one_card_list == 0 then
|
||||||
text2 = {}
|
table.insert(one_card_list, v)
|
||||||
if k > num then
|
old_k = k
|
||||||
for l, p in pairs(pokerMap) do
|
else
|
||||||
for i = 0, length - 1 do
|
if k == 15 then
|
||||||
if l == k + i and l ~= 15 and l ~= 16 then
|
break
|
||||||
-- body
|
|
||||||
text[#text + 1] = { p[1] }
|
|
||||||
text2[#text2 + 1] = l
|
|
||||||
if #text >= length then
|
|
||||||
-- body
|
|
||||||
local x = #one_card_list
|
|
||||||
local y = #touch_key_list
|
|
||||||
for i = 1, #text - 1 do
|
|
||||||
one_card_list[x + 1] = text[1]
|
|
||||||
touch_key_list[y + 1] = text2[2]
|
|
||||||
-- 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
|
|
||||||
table.insert(one_card_list[x + 1], v)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
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
|
||||||
return one_card_list, touch_key_list, length
|
if #one_card_list < 5 then
|
||||||
|
one_card_list = {}
|
||||||
|
end
|
||||||
|
return one_card_list
|
||||||
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()
|
||||||
|
|
|
||||||
|
|
@ -2,88 +2,93 @@ local MainRightPanelView = require("Game.View.MainRightPanelView")
|
||||||
local RunFast_RightPanelView = {}
|
local RunFast_RightPanelView = {}
|
||||||
local M = RunFast_RightPanelView
|
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()
|
||||||
local _settingView = mainView:NewSettingView()
|
print("lingmengmainview", mainView.dismiss_room_cd_time)
|
||||||
_settingView.stateIndex = (mainView._room.curren_round >= 1 and mainView._allow_dissmiss) and 2 or 1
|
local _settingView = mainView:NewSettingView()
|
||||||
_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()
|
||||||
|
|
||||||
-- self._timer = Timer.New(handler(self,self.__UpdateTime),10,-1,true)
|
-- self._timer = Timer.New(handler(self,self.__UpdateTime),10,-1,true)
|
||||||
-- self._timer:Start()
|
-- self._timer:Start()
|
||||||
end
|
end
|
||||||
function RunFast_RightPanelView.new(mainView, view)
|
function RunFast_RightPanelView.new(mainView, view)
|
||||||
setmetatable(M, { __index = MainRightPanelView })
|
setmetatable(M, { __index = MainRightPanelView })
|
||||||
local self = setmetatable({}, { __index = M })
|
local self = setmetatable({}, { __index = M })
|
||||||
self.class = "RunFast_RightPanelView"
|
self.class = "RunFast_RightPanelView"
|
||||||
__init(self, mainView, view)
|
__init(self, mainView, view)
|
||||||
return self
|
return self
|
||||||
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
|
||||||
|
|
|
||||||
|
|
@ -5,65 +5,67 @@ local MainRightPanelView = import('Game.View.MainRightPanelView')
|
||||||
---
|
---
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
setmetatable(M, {__index = MainView})
|
setmetatable(M, { __index = MainView })
|
||||||
|
|
||||||
local pk_default_bg = 1
|
local pk_default_bg = 1
|
||||||
local pk_bg_config = {
|
local pk_bg_config = {
|
||||||
{id = 1, url = 'base/main_poker/bg/bg3', thumb = 'ui://Main_Poker/bg3'},
|
{ id = 1, url = 'base/main_poker/bg/bg3', thumb = 'ui://Main_Poker/bg3' },
|
||||||
{id = 2, url = 'base/main_poker/bg/bg2', thumb = 'ui://Main_Poker/bg2'},
|
{ id = 2, url = 'base/main_poker/bg/bg2', thumb = 'ui://Main_Poker/bg2' },
|
||||||
{id = 3, url = 'base/main_poker/bg/bg1', thumb = 'ui://Main_Poker/bg1'}
|
{ id = 3, url = 'base/main_poker/bg/bg1', thumb = 'ui://Main_Poker/bg1' }
|
||||||
}
|
}
|
||||||
|
|
||||||
-- settingViewType:1跑得快:显示换牌,隐藏返回和解散 2超级拼十:隐藏解散和换牌 3其他:隐藏换牌,根据是否观战显示解散和返回
|
-- settingViewType:1跑得快:显示换牌,隐藏返回和解散 2超级拼十:隐藏解散和换牌 3其他:隐藏换牌,根据是否观战显示解散和返回
|
||||||
-- ex_defaultbg 自定义默认背景编号
|
-- ex_defaultbg 自定义默认背景编号
|
||||||
-- ex_bgconfig 自定义的背景
|
-- ex_bgconfig 自定义的背景
|
||||||
function M:InitView(url, isHideIpAdds, settingViewType, ex_defaultbg, ex_bgconfig, isHideJiesan,settingUrl)
|
function M:InitView(url, isHideIpAdds, settingViewType, ex_defaultbg, ex_bgconfig, isHideJiesan, settingUrl)
|
||||||
UIPackage.AddPackage('base/main_poker/ui/Main_Poker')
|
UIPackage.AddPackage('base/main_poker/ui/Main_Poker')
|
||||||
MainView.InitView(self, url, isHideIpAdds)
|
MainView.InitView(self, url, isHideIpAdds)
|
||||||
|
|
||||||
local default_bg = ex_defaultbg or pk_default_bg
|
local default_bg = ex_defaultbg or pk_default_bg
|
||||||
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
|
||||||
|
|
||||||
|
|
@ -73,80 +75,73 @@ function M:InitView(url, isHideIpAdds, settingViewType, ex_defaultbg, ex_bgconfi
|
||||||
if rightpanel then
|
if rightpanel then
|
||||||
self._rightPanelView = MainRightPanelView.new(self, rightpanel)
|
self._rightPanelView = MainRightPanelView.new(self, rightpanel)
|
||||||
end
|
end
|
||||||
self:InitXiPai()
|
self:InitXiPai()
|
||||||
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)
|
||||||
|
|
||||||
local offset = get_offset(self._full_offset)
|
local offset = get_offset(self._full_offset)
|
||||||
|
|
||||||
self._xipaiPanel.width = GRoot.inst.width - (offset * 2)
|
self._xipaiPanel.width = GRoot.inst.width - (offset * 2)
|
||||||
self._xipaiPanel.height = GRoot.inst.height
|
self._xipaiPanel.height = GRoot.inst.height
|
||||||
self._xipaiPanel.x = offset
|
self._xipaiPanel.x = offset
|
||||||
|
|
||||||
self._xipaiPanel.visible=false
|
self._xipaiPanel.visible = false
|
||||||
self._handAnimCtr=self._xipaiPanel:GetController("anim")
|
self._handAnimCtr = self._xipaiPanel:GetController("anim")
|
||||||
self._handAnimCtr.selectedIndex=0
|
self._handAnimCtr.selectedIndex = 0
|
||||||
--self:PlayXiPai()
|
--self:PlayXiPai()
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:PlayXiPai(xipaiCallBack)
|
function M:PlayXiPai(xipaiCallBack)
|
||||||
if self._xipaiPanel then
|
if self._xipaiPanel then
|
||||||
coroutine.start(function()
|
coroutine.start(function()
|
||||||
self._xipaiPanel.visible=true
|
self._xipaiPanel.visible = true
|
||||||
self._xipaiPanel:GetTransition("XiPai"):Play()
|
self._xipaiPanel:GetTransition("XiPai"):Play()
|
||||||
self._handAnimCtr.selectedIndex=1
|
self._handAnimCtr.selectedIndex = 1
|
||||||
coroutine.wait(3.5)
|
coroutine.wait(3.5)
|
||||||
self._handAnimCtr.selectedIndex=0
|
self._handAnimCtr.selectedIndex = 0
|
||||||
self._xipaiPanel.visible=false
|
self._xipaiPanel.visible = false
|
||||||
if xipaiCallBack then
|
if xipaiCallBack then
|
||||||
xipaiCallBack()
|
xipaiCallBack()
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:InitXiPai1()
|
function M:InitXiPai1()
|
||||||
self._xipaiPanel1 = UIPackage.CreateObjectFromURL("ui://Common/panel_handPoke02")
|
self._xipaiPanel1 = UIPackage.CreateObjectFromURL("ui://Common/panel_handPoke02")
|
||||||
self._root_view:AddChild(self._xipaiPanel1)
|
self._root_view:AddChild(self._xipaiPanel1)
|
||||||
|
|
||||||
local offset = get_offset(self._full_offset)
|
local offset = get_offset(self._full_offset)
|
||||||
|
|
||||||
self._xipaiPanel1.width = GRoot.inst.width - (offset * 2)
|
self._xipaiPanel1.width = GRoot.inst.width - (offset * 2)
|
||||||
self._xipaiPanel1.height = GRoot.inst.height
|
self._xipaiPanel1.height = GRoot.inst.height
|
||||||
self._xipaiPanel1.x = offset
|
self._xipaiPanel1.x = offset
|
||||||
|
|
||||||
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)
|
||||||
if self._xipaiPanel1 then
|
if self._xipaiPanel1 then
|
||||||
coroutine.start(function()
|
coroutine.start(function()
|
||||||
self._xipaiPanel1.visible=true
|
self._xipaiPanel1.visible = true
|
||||||
self._xipaiPanel1:GetTransition("XiPai"):Play()
|
self._xipaiPanel1:GetTransition("XiPai"):Play()
|
||||||
self._handAnimCtr1.selectedIndex=1
|
self._handAnimCtr1.selectedIndex = 1
|
||||||
coroutine.wait(3.5)
|
coroutine.wait(3.5)
|
||||||
self._handAnimCtr1.selectedIndex=0
|
self._handAnimCtr1.selectedIndex = 0
|
||||||
self._xipaiPanel1.visible=false
|
self._xipaiPanel1.visible = false
|
||||||
if xipaiCallBack then
|
if xipaiCallBack then
|
||||||
xipaiCallBack()
|
xipaiCallBack()
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- 设置界面的换牌回调,需要换牌的玩法settingViewType传1,重写这个方法
|
-- 设置界面的换牌回调,需要换牌的玩法settingViewType传1,重写这个方法
|
||||||
function M:UpdateCard(index)
|
function M:UpdateCard(index)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,10 @@ local PKSettingView = {
|
||||||
__changePokerSizeCallBack = nil,
|
__changePokerSizeCallBack = nil,
|
||||||
}
|
}
|
||||||
local M = PKSettingView
|
local M = PKSettingView
|
||||||
function PKSettingView.new(blur_view, show_type, isjiesan,url,cardSizeHandle)
|
function PKSettingView.new(blur_view, show_type, isjiesan, url, cardSizeHandle)
|
||||||
setmetatable(SettingView, {__index = BaseWindow})
|
setmetatable(SettingView, { __index = BaseWindow })
|
||||||
setmetatable(M, {__index = SettingView})
|
setmetatable(M, { __index = SettingView })
|
||||||
local self = setmetatable({}, {__index = M})
|
local self = setmetatable({}, { __index = M })
|
||||||
self.class = 'PKSettingView'
|
self.class = 'PKSettingView'
|
||||||
self._currenIndex = 0
|
self._currenIndex = 0
|
||||||
self._blur_view = blur_view
|
self._blur_view = blur_view
|
||||||
|
|
@ -18,98 +18,96 @@ 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
|
||||||
self.__changePokerSizeCallBack=cardSizeHandle
|
self.__changePokerSizeCallBack = 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
|
||||||
end
|
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
|
-- end
|
||||||
|
|
||||||
card_size.onChanged:Set(
|
-- card_size.onChanged:Set(
|
||||||
function()
|
-- function()
|
||||||
if self.__changePokerSizeCallBack then
|
-- if self.__changePokerSizeCallBack then
|
||||||
self.__changePokerSizeCallBack(card_size.selectedIndex)
|
-- self.__changePokerSizeCallBack(card_size.selectedIndex)
|
||||||
end
|
-- end
|
||||||
--点击换牌按钮后保存当前游戏的牌
|
-- --点击换牌按钮后保存当前游戏的牌
|
||||||
local user_id = DataManager.SelfUser.account_id
|
-- local user_id = DataManager.SelfUser.account_id
|
||||||
local _data = {}
|
-- local _data = {}
|
||||||
_data['cardsize'] = card_size.selectedIndex
|
-- _data['cardsize'] = card_size.selectedIndex
|
||||||
local key = user_id .. room.game_id .. 'cardsize'
|
-- local key = user_id .. room.game_id .. 'cardsize'
|
||||||
Utils.SaveLocalFile(key, json.encode(_data))
|
-- Utils.SaveLocalFile(key, json.encode(_data))
|
||||||
end
|
-- end
|
||||||
)
|
-- )
|
||||||
|
|
||||||
self._view:GetChild('btn_close').onClick:Add(
|
-- self._view:GetChild('btn_close').onClick:Add(
|
||||||
function(...)
|
-- function(...)
|
||||||
self:Destroy()
|
-- self:Destroy()
|
||||||
end
|
-- end
|
||||||
)
|
-- )
|
||||||
end
|
-- end
|
||||||
if self.isjiesan then
|
-- if self.isjiesan then
|
||||||
self._view:GetChild('n82').visible = false
|
-- self._view:GetChild('n82').visible = false
|
||||||
end
|
-- end
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:Show()
|
-- function M:Show()
|
||||||
SettingView.Show(self)
|
-- SettingView.Show(self)
|
||||||
self:showSettingOption()
|
-- -- self:showSettingOption()
|
||||||
end
|
-- 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(
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 383 KiB After Width: | Height: | Size: 830 KiB |
|
|
@ -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:
|
||||||
|
|
|
||||||
|
|
@ -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:
|
||||||
|
|
|
||||||
|
|
@ -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:
|
||||||
|
|
|
||||||
|
|
@ -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:
|
||||||
|
|
|
||||||
|
|
@ -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:
|
||||||
|
|
|
||||||
|
|
@ -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:
|
||||||
|
|
|
||||||
|
|
@ -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:
|
||||||
|
|
|
||||||
|
|
@ -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:
|
||||||
|
|
|
||||||
|
|
@ -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:
|
||||||
|
|
|
||||||
|
|
@ -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:
|
||||||
|
|
|
||||||
|
|
@ -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:
|
||||||
|
|
|
||||||
|
|
@ -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:
|
||||||
|
|
|
||||||
|
After Width: | Height: | Size: 550 KiB |
|
|
@ -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:
|
||||||
|
After Width: | Height: | Size: 268 KiB |
|
|
@ -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:
|
||||||
|
After Width: | Height: | Size: 1.5 MiB |
|
|
@ -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:
|
||||||
|
After Width: | Height: | Size: 95 KiB |
|
|
@ -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:
|
||||||
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.3 MiB |