0919基本完成,调通大厅创建房间

master
罗家炜 2025-09-19 16:34:16 +08:00
parent 823b757ea0
commit 269d1bd01d
113 changed files with 818 additions and 663 deletions

View File

@ -530,7 +530,12 @@ end
function M:PopEvent()
local _cacheEvent = self._cacheEvent
if (_cacheEvent:Count() > 0) then
return _cacheEvent:Dequeue()
local rawFunc = _cacheEvent:Dequeue()
return function(...)
return xpcall(rawFunc, function(e)
return debug.traceback("Lua Error: " .. tostring(e), 2)
end, ...)
end
end
end

View File

@ -17,11 +17,11 @@ IGameInfo = {
local M = IGameInfo
function M:SelectedCardNum()
return 0
return 0
end
function M:SelectedConfigData()
return {}
return {}
end
function M:FillData()
@ -42,14 +42,14 @@ end
function M:OnChangeOption(ctype)
self:ShowRoomPrice(ctype)
local round = self._config:GetController("round")
round.onChanged:Set(function ()
self:ShowVariablePrice(ctype)
end)
round.onChanged:Set(function()
self:ShowVariablePrice(ctype)
end)
end
function M:ShowVariablePrice(ctype)
-- 显示回合数后面的价格tex_price1、tex_price2
for i = 1, self._roundChoice do
local price = "0"
price = self._game_data[string.format("pay%s_%s", i, self._maxPlayer)]
@ -72,18 +72,31 @@ function M:SetDefault()
end
function M:LoadConfigToDetail(data)
local returnString = ''
local configData = data
if type(data) == 'string' then
configData = json.decode(data)
end
pt(configData)
function M:LoadConfigToDetail(configData, hpData)
local returnString = ""
if configData.GPSDetection then
returnString = string.format("%s%s", returnString,
configData.GPSDetection == 0 and ",距离不限制" or string.format(",距离限制%s米", configData.GPSDetection))
end
if configData.tuoguan_active_time then
returnString = string.format("%s%s", returnString,
configData.tuoguan_active_time == 0 and ",不自动托管" or string.format(",%s秒托管", configData.tuoguan_active_time))
end
if hpData then
if hpData.JieShan then
returnString = string.format("%s%s", returnString,
hpData.JieShan == 1 and ",托管结束后不解散" or
string.format(",托管%s结束后强制解散", hpData.JieShan == 2 and "当局" or string.format("%s局", hpData.JieShan - 1)))
end
if hpData.BanChat then
returnString = string.format("%s%s", returnString, hpData.BanChat == 1 and ",不允许快捷聊天" or "")
end
if hpData.BanMissile then
returnString = string.format("%s%s", returnString, hpData.BanMissile == 1 and ",关闭互动表情" or "")
end
end
return returnString
end
return M
return M

View File

@ -75,7 +75,6 @@ end
function M:_evtDelPlay(...)
local arg = { ... }
print("family event _evtDelPlay")
local view = ViewManager.GetCurrenView()
if view.class ~= "FamilyMainView" then

View File

@ -12,25 +12,25 @@ local function charge(num, self)
local _curren_msg =
MsgWindow.new(
self._root_view,
'确定要将房卡重置在改亲友圈?',
string.format('确定要向该亲友圈里充值%d房卡', num),
MsgWindow.MsgMode.OkAndCancel
)
_curren_msg.onOk:Add(
function()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_Recharge_Diamo(self.groupId, num, function(res)
print("收到充值房卡回调")
pt(res)
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "操作失败")
ViewUtil.ErrorTip(res.ReturnCode, "重置房卡操作失败")
return
end
ViewUtil.ErrorTip(-1, "房卡充值成功")
local groupDiamo = res.Data.groupDiamo
local playerDiamo = res.Data.userDiamo
self.tex_curCard.text = "当前帐号房卡:" .. playerDiamo
self.tex_famliyCard.text = "亲友圈房卡:" .. groupDiamo
self.group.groupDiamo = groupDiamo
DataManager.SelfUser.diamo = playerDiamo
self:Destroy()
end)
end
)
@ -67,7 +67,27 @@ function FamilyRoomCard.New()
obj:GetController("cColor").selectedIndex = data[_idx].colorIndex
obj.onClick:Set(function()
charge(num, Instance)
if Instance.group and Instance.group ~= 1 then
local _curren_msg =
MsgWindow.new(
Instance._root_view,
"只有管理员可以充值",
MsgWindow.MsgMode.OnlyOk
)
_curren_msg:Show()
return
end
if DataManager.SelfUser.diamo < num then
local _curren_msg =
MsgWindow.new(
Instance._root_view,
"您的房卡不足",
MsgWindow.MsgMode.OnlyOk
)
_curren_msg:Show()
else
charge(num, Instance)
end
end)
end

View File

@ -61,54 +61,56 @@ function PlayEditView:Init()
group:addPlay(play)
-- self:FillView()
UpdateFamilyRoom(self) --self:UpdateFamilyRoom(fgCtr, self.groupId)
self:Refalsh(self.groupId)
-- self:Refalsh(self.groupId)
printlog("刷新玩法===>>>>")
group.update_play = true
end)
tem:Show()
end)
return
end
obj:GetChild('text_title').text = playList[index].game_name
local mode = ExtendManager.GetExtendConfig(playList[index].gameId):GetGameInfo()
local pId = playList[index].id
-- times倍数
local times = json.decode(playList[index].hpData).times
obj:GetChild('Label_details'):GetChild('title').text = times / 1000 ..
"倍," .. mode:LoadConfigToDetail(playList[index].config, playList[index].hpData)
obj:GetChild('text_playName').emojies = EmojiDitc.EmojiesDitc
obj:GetChild('text_playName').text = Utils.TextOmit(playList[index].name, 6, "...")
obj:GetController('type').selectedIndex = 1
obj:GetChild('btn_del').onClick:Set(function()
ViewUtil.ShowTwoChooose("是否要删除该玩法", function()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_DelPlay(self.groupId, playList[index].id, function(res)
if res.ReturnCode ~= 0 then
local msg = Table_Error_code_Map[res.ReturnCode] or {}
msg = msg.note or "操作失败"
ViewUtil.ShowBannerOnScreenCenter(msg)
return
end
else
obj:GetChild('text_title').text = playList[index].game_name
local mode = ExtendManager.GetExtendConfig(playList[index].gameId):GetGameInfo()
local pId = playList[index].id
-- times倍数
local times = json.decode(playList[index].hpData).times
obj:GetChild('Label_details'):GetChild('title').text = mode:LoadConfigToDetail(playList[index].config,
playList[index].hpData)
obj:GetChild('text_playName').emojies = EmojiDitc.EmojiesDitc
obj:GetChild('text_playName').text = Utils.TextOmit(playList[index].name, 6, "...")
obj:GetController('type').selectedIndex = 1
obj:GetChild('btn_del').onClick:Set(function()
ViewUtil.ShowTwoChooose("是否要删除该玩法", function()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_DelPlay(self.groupId, playList[index].id, function(res)
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "删除玩法操作失败")
return
end
UpdateFamilyRoom(self) --self:UpdateFamilyRoom(fgCtr, self.groupId)
self:Refalsh(self.groupId)
UpdateFamilyRoom(self) --self:UpdateFamilyRoom(fgCtr, self.groupId)
-- self:Refalsh(self.groupId)
end)
end)
end)
end)
obj:GetChild("btn_edit").onClick:Set(function()
local tem = GroupGameSettingView.new(self.blur_view, self.groupId, pId, playList[index],
function(play)
local group = DataManager.groups:get(self.groupId)
group:addPlay(play)
-- self:FillView()
UpdateFamilyRoom(self) --self:UpdateFamilyRoom(fgCtr, self.groupId)
self:Refalsh(self.groupId)
printlog("刷新玩法===>>>>")
group.update_play = true
end)
tem:Show()
end)
obj:GetChild("btn_edit").onClick:Set(function()
local tem = GroupGameSettingView.new(self.blur_view, self.groupId, pId, playList[index],
function(play)
local group = DataManager.groups:get(self.groupId)
group:addPlay(play)
-- self:FillView()
UpdateFamilyRoom(self) --self:UpdateFamilyRoom(fgCtr, self.groupId)
-- self:Refalsh(self.groupId)
printlog("刷新玩法===>>>>")
group.update_play = true
end)
tem:Show()
end)
end
end
end
function PlayEditView:Destroy()
BaseWindow.Destroy(self)
end
return PlayEditView

View File

@ -315,8 +315,6 @@ function M:SetIsOpenChatRoom()
if self._group.isOpenChatRoom == 1 then
mgr_ctr:FG_CLOSE_ISOPEN_CHATROOM(self._group.id, function(res)
print("不允许成员可以查看聊天室")
pt(res)
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode)
return
@ -326,8 +324,6 @@ function M:SetIsOpenChatRoom()
end)
elseif self._group.isOpenChatRoom == 0 then
mgr_ctr:FG_OPEN_ISOPEN_CHATROOM(self._group.id, function(res)
print("允许成员可以查看聊天室")
pt(res)
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode)
return
@ -390,10 +386,8 @@ function M:JoinFamily(frist)
end
function M:PlayEdit()
--self.familyType.selectedIndex = 2
--self.lastType = 1
local view = PlayEditView.New()
view:Show(self._group.id)
self._view_PlayEditView = PlayEditView.New()
self._view_PlayEditView:Show(self._group.id)
end
function M:OpenMyFamily(groupId)
@ -539,7 +533,13 @@ end
function M:EnterGroup(fgCtr, id)
fgCtr:FG_EnterGroup(id, function(res)
ViewUtil:CloseModalWait()
ViewUtil:CloseModalWait2()
if res.ReturnCode ~= 0 then
if res.ReturnCode == 101 then
ViewUtil:ShowModalWait2(0.01)
self:EnterGroup(fgCtr, id)
return
end
ViewUtil.ErrorTip(res.ReturnCode, "获取房间列表列表失败")
else
self:OnEnterGroupCallBack()
@ -590,8 +590,6 @@ end
function M:UpdateFamilyRoom(fgCtr, id)
local list_room = self._view:GetChild('list_room')
list_room:SetVirtual()
--local list_gamePlay = self._view:GetChild('list_gamePlay')
--list_gamePlay:SetVirtual()
local playList = self._group.playList
local roomList = self._group.rooms
self._view:GetChild('n364').text = string.format("已开启%s桌游戏", #roomList)
@ -728,6 +726,10 @@ function M:UpdateFamilyRoom(fgCtr, id)
else
list_room.numItems = all_num
end
--如果在编辑玩法页面则此处调用刷新
if self._view_PlayEditView then
self._view_PlayEditView:Refalsh(self._group.id)
end
end
--房间渲染

View File

@ -25,9 +25,9 @@ end
function M:init(url)
BaseWindow.init(self, url)
self.gl_view = GameListView.new(self._view, self.selectedIndex, nil, function(mode_data)
self.gl_view = GameListView.new(self._view, 1, 1, nil, function(mode_data)
self:OnCreateRoom(mode_data)
end, true)
end, true, { _lobby_create = true })
--self.gl_view.IsHallGame=true
end

View File

@ -4,9 +4,8 @@ local GameListView = {}
local M = GameListView
function GameListView.new(view, index, page, room_config, callback, isHall)
function GameListView.new(view, index, page, room_config, callback, isHall, data)
local self = {}
pt("lingmeng GameListView", view, index, page, room_config, callback, isHall)
setmetatable(self, { __index = M })
self._view = view
self._modeMap = {}
@ -15,6 +14,10 @@ function GameListView.new(view, index, page, room_config, callback, isHall)
self.room_config = room_config
self.IsHallGame = isHall or false
self._callback = callback
if data then
self._data = data
self._lobby_create = data._lobby_create
end
self:init()
return self
end
@ -30,6 +33,12 @@ function M:init()
end
end)
if self._lobby_create then
self._view:GetChild("Lobby_create").visible = true
else
self._view:GetChild("Lobby_create").visible = false
end
self.tempGame = { {}, {}, {} }
local games = DataManager.SelfUser.games
for k, v in ipairs(games) do

View File

@ -7,25 +7,25 @@ local gamePlayDetail = {
--麻将
{
{
icon0 = "lichuan0",
icon1 = "lichuan1",
detail = "lichuanDetail"
icon0 = "fuzhou0",
icon1 = "fuzhou1",
detail = "fuzhouDetail"
},
{
icon0 = "jinxi0",
icon1 = "jinxi1",
detail = "jinxiDetail"
},
{
icon0 = "fuzhou0",
icon1 = "fuzhou1",
detail = "fuzhouDetail"
},
{
icon0 = "nancheng0",
icon1 = "nancheng1",
detail = "nanchengDetail"
},
{
icon0 = "lichuan0",
icon1 = "lichuan1",
detail = "lichuanDetail"
},
},
--扑克
{

View File

@ -28,15 +28,27 @@ function M:init(url)
btn_music.selected = GameApplication.Instance.MusicMute
slider_music.onChanged:Add(function()
GameApplication.Instance.MusicValue = slider_music.value
btn_music.selected = false
GameApplication.Instance.MusicMute = false;
local value = math.floor(slider_music.value)
if value > 0 then
btn_music.selected = false
GameApplication.Instance.MusicMute = false;
else
btn_music.selected = true
GameApplication.Instance.MusicMute = true;
end
GameApplication.Instance.MusicValue = value
end)
slider_sound.onChanged:Add(function()
GameApplication.Instance.SoundValue = slider_sound.value
btn_sound.selected = false
GameApplication.Instance.SoundMute = false;
local value = math.floor(slider_sound.value)
if value > 0 then
btn_sound.selected = false
GameApplication.Instance.SoundMute = false;
else
btn_sound.selected = true
GameApplication.Instance.SoundMute = true;
end
GameApplication.Instance.SoundValue = value
end)
btn_sound.onClick:Add(function()

View File

@ -103,6 +103,7 @@ function M:InitView(url)
-- clickTime = clickTime + 1
-- return
-- end
local user = DataManager.SelfUser
if user.group_id ~= 0 then
self:ReconnectRoom(user.group_id)
@ -148,9 +149,9 @@ function M:InitView(url)
end)
local btn_diamo = self._view:GetChild("btn_diamo")
btn_diamo.onClick:Add(function()
ViewUtil.ErrorTip(self._view, string.format("当前房卡一共%s张", DataManager.SelfUser.diamo))
end)
-- btn_diamo.onClick:Add(function()
-- ViewUtil.ErrorTip(self._view, string.format("当前房卡一共%s张", DataManager.SelfUser.diamo))
-- end)
local btn_customerService = self._view:GetChild("btn_customerService")
btn_customerService.onClick:Add(function()
@ -510,18 +511,8 @@ function M:GetPlayerInfoData()
self:ShowPlayerInfo(data.raffle, data.diamo, data.newMail)
if data.group_id ~= 0 then
-- 重连,确保头像加载成功才能重连
-- ViewUtil.ShowModalWait2(self._root_view)
-- coroutine.start(function()
-- local waitTimes = 0
-- while not self._flag_loadImageSucces do
-- if waitTimes > 10 then
-- break
-- end
-- coroutine.wait(0.2)
-- end
-- ViewUtil.CloseModalWait()
self:ReconnectRoom(data.groupId)
-- end)
end
end
end)

View File

@ -162,11 +162,31 @@ local function __login_response(self, response)
ViewUtil.ShowModalWait(self._root_view, "正在加入房间...")
__join_room(roomid, response)
return
else
self:ReconnectRoom(user.group_id)
return
end
end
__goto_lobby(response)
end
--把拿取跑马灯信息放在这里
local lobbyCtr1 = ControllerManager.GetController(LoddyController)
lobbyCtr1:UpdateNotice(DataManager.SelfUser.account_id, function(result, data)
if result then
if not data or not data.notice_list then
self._mesList = ""
else
local mesl = {}
for i = 1, #data.notice_list do
mesl[i] = data.notice_list[i] --.informContent
end
self._mesList = mesl
DataManager.GameNotice = mesl
end
end
end)
if user.update ~= 0 then
ExtendHotupdate.UpdateGameList(user.games, f_enterLobby)
else
@ -270,6 +290,49 @@ function M:LoginCallBack(result, data)
end)
end
--在进入前重连房间,如果有
function M:ReconnectRoom(groupId)
local roomId = DataManager.SelfUser.room_id
print("===============================ReconnectRoom", roomId, 1)
if roomId and #roomId > 0 then
local roomCtr = ControllerManager.GetController(RoomController)
roomCtr:PublicJoinRoom(
Protocol.WEB_FG_JOIN_ROOM,
roomId,
false,
function(response)
if (response.ReturnCode == -1) then
ViewUtil.ErrorMsg(self._root_view, response.ReturnCode, 'response.ReturnCode == -1')
RestartGame()
return
end
if response.ReturnCode ~= 0 then
ViewUtil.ErrorMsg(self._root_view, response.ReturnCode, '进入房间失败')
FamilyView.lastId = groupId
ViewManager.ChangeView(ViewManager.View_Family)
return
else
UIPackage.AddPackage("base/lobby/ui/Lobby")
FamilyView.lastId = groupId
DataManager.SelfUser.room_id = ""
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GroupList(function(res)
print("获取所有圈信息")
pt(res)
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "重连获取亲友圈信息失败")
end
end)
ViewManager.ChangeView(ViewManager.View_Main, DataManager.CurrenRoom.game_id)
end
end,
groupId
)
end
end
function M:Destroy()
BaseView.Destroy(self)
-- UIPackage.RemovePackage("base/embed/ui/Hotupdate")

View File

@ -334,6 +334,7 @@ function M:InitView(url, isHideIpAdds)
self._chat_Talk.onTouchEnd:Set(self.__RecordTouchEnd, self)
self._chat_Talk.onTouchMove:Set(handler(self, self.__RecordTouchMove))
Voice.BeginRecord()
self._record_view_ctr.selectedIndex = 0
self._ctr_voice.selectedIndex = 1
-- self.__runwait_record = nil
-- self.__runwait_record = coroutine.start(self.__WaitRecord, self)
@ -702,7 +703,7 @@ function M:NewSettingView()
end
function M:__RecordTouchMove(context)
if Mathf.Abs(context.inputEvent.x - self._record_pos.x) >= 50 or Mathf.Abs(context.inputEvent.y - self._record_pos.y) >= 50 then
if Mathf.Abs(context.inputEvent.x - self._record_pos.x) >= 67 or Mathf.Abs(context.inputEvent.y - self._record_pos.y) >= 67 then
self._record_view_ctr.selectedIndex = 1
else
self._record_view_ctr.selectedIndex = 0
@ -1198,39 +1199,39 @@ function M:MarkSelfTuoguan()
local _msg_view = nil
com_tuoguan:GetChild('n0').onClick:Set(
function()
if _msg_view then
_msg_view:Dispose()
end
local _curren_msg = UIPackage.CreateObjectFromURL('ui://Common/MessageBox')
_msg_view = _curren_msg
_msg_view:GetChild('btn_ok').onClick:Set(
function()
_msg_view:Dispose()
_msg_view = nil
self._gamectr:Entrust(false)
end
)
_msg_view:GetChild('btn_close').onClick:Set(
function()
_msg_view:Dispose()
_msg_view = nil
end
)
-- if _msg_view then
-- _msg_view:Dispose()
-- end
-- local _curren_msg = UIPackage.CreateObjectFromURL('ui://Common/MessageBox')
-- _msg_view = _curren_msg
-- _msg_view:GetChild('btn_ok').onClick:Set(
-- function()
-- _msg_view:Dispose()
-- _msg_view = nil
self._gamectr:Entrust(false)
-- end
-- )
-- _msg_view:GetChild('btn_close').onClick:Set(
-- function()
-- _msg_view:Dispose()
-- _msg_view = nil
-- end
-- )
_msg_view:GetChild('btn_close1').onClick:Set(
function()
_msg_view:Dispose()
_msg_view = nil
end
)
local roate = GRoot.inst.width / GRoot.inst.height
local num = 100
if roate < 1.9 then
num = 250
end
com_tuoguan:AddChild(_msg_view)
_msg_view:Center()
_msg_view:GetChild('tex_message').text = '确定要取消托管吗?'
-- _msg_view:GetChild('btn_close1').onClick:Set(
-- function()
-- _msg_view:Dispose()
-- _msg_view = nil
-- end
-- )
-- local roate = GRoot.inst.width / GRoot.inst.height
-- local num = 100
-- if roate < 1.9 then
-- num = 250
-- end
-- com_tuoguan:AddChild(_msg_view)
-- _msg_view:Center()
-- _msg_view:GetChild('tex_message').text = '确定要取消托管吗?'
-- _msg_view.x = (com_tuoguan.width - _msg_view.width) * 0.5 - num
-- _msg_view.y = (com_tuoguan.height - com_tuoguan.y - _msg_view.height) * 0.5
end
@ -1334,7 +1335,7 @@ function M:OnUpdate()
if result then
else
error(resultInfo)
print("error", resultInfo)
self._gamectr = ControllerManager.GetController(GameController)
if self._gamectr then
self._gamectr:ResetConnect()
@ -1513,6 +1514,7 @@ function M:Destroy()
self:UnmarkSelfTuoguan()
self:DestroyPlayerInfo()
DSTweenManager.ClearTween()
MissileSender.Clear()
NetResetConnectWindow.CloseNetReset()
Voice.CrealRecord()

View File

@ -90,4 +90,11 @@ function MissileSender.Animation(target, animUrl, view)
e.xy = target.xy
end
function MissileSender.Clear()
MissileSender = {}
pool = {}
curView = {}
MovieClipPool = {}
end
return MissileSender

View File

@ -55,7 +55,7 @@ function ViewUtil.CloseModalWait()
ModalWaitingWindow.CloseModal()
end
function ViewUtil.ShowModalWait2(blur_view, title, time)
function ViewUtil.ShowModalWait2(blur_view, time)
ViewUtil.CloseModalWait2()
ViewUtil.continue = coroutine.start(
function()

View File

@ -25,6 +25,15 @@ end
-- 语音是否禁止
local record_baned = 0
local function GetPlayer(self, playerId)
for _, p in pairs(self._room.player_list) do
if playerId == p.self_user.account_id then
return p
end
end
return nil
end
function M:InitView(url)
local room = self._room
BaseView.InitView(self, url)
@ -432,6 +441,7 @@ function M:Destroy()
self:UnmarkSelfTuoguan()
self:DestroyPlayerInfo()
DSTweenManager.ClearTween()
MissileSender.Clear()
NetResetConnectWindow.CloseNetReset()
Voice.CrealRecord()

View File

@ -19,7 +19,7 @@ Table_Error_code_Map = {
[4] = { id = 4, note = "" },
[5] = { id = 5, note = "玩法不可用" },
[6] = { id = 6, note = "游戏已停用" },
[7] = { id = 7, note = "房卡不足" },
[7] = { id = 7, note = "该亲友圈房卡不足,请联系亲友圈管理员!" },
[8] = { id = 8, note = "已经在亲友圈中" },
[9] = { id = 9, note = "邀请码无效" },
[10] = { id = 10, note = "房间已满" },
@ -36,7 +36,7 @@ Table_Error_code_Map = {
[26] = { id = 26, note = "创建房间数达到上限" },
[27] = { id = 27, note = "正在游戏中,删除房间失败" },
[28] = { id = 28, note = "多次登录失败,禁止登录,请过段时间再次尝试" },
[101] = { id = 101, note = "请检查您的网络设置" },
-- [101] = { id = 101, note = "请检查您的网络设置" }, --请检查您的网络设置,暂时注释
[102] = { id = 102, note = "网络连接超时" },
[500] = { id = 500, note = "" },
[999] = { id = 999, note = "未知错误" },

View File

@ -86,14 +86,17 @@ function M:InitData(over, room, result, total_result, callback, isWitness, witne
end
self:DestroyWithCallback()
else
local _gamectr = ControllerManager.GetController(GameController)
_gamectr:PlayerReady()
self:DestroyWithCallback()
if over == 0 then
local _gamectr = ControllerManager.GetController(GameController)
_gamectr:PlayerReady()
self:DestroyWithCallback()
else
mainCtr.selectedIndex = 1
_overCtr.selectedIndex = 1
end
end
end)
endRound.onClick:Set(function()
ViewManager.ChangeView(ViewManager.View_Family)
end)
@ -115,15 +118,15 @@ function M:InitData(over, room, result, total_result, callback, isWitness, witne
end
end)
elseif over == 1 then
mainCtr.selectedIndex = 1
showBtnTypeCtr.selectedIndex = 1
self:fillResult1(room, peopleNum, total_result)
if result then
_overCtr.selectedIndex = 0
self:fillResult0(room, peopleNum, result)
nextRoundBtn2.onClick:Set(function()
_overCtr.selectedIndex = 1
end)
else
showBtnTypeCtr.selectedIndex = 1
_overCtr.selectedIndex = 1
end
else --解散房间如果没有开局直接退出不显示结算界面over=2

View File

@ -176,7 +176,7 @@ function M:LoadConfigData(data)
self._config:GetChild("n93").text = string.format("奖%s马", data.jiangma * 2)
end
function M:LoadConfigToDetail(data, hpdata)
function M:LoadConfigToDetailOnlyPlay(data, hpdata)
local configData = data
if type(data) == 'string' then
configData = json.decode(data)
@ -184,7 +184,11 @@ function M:LoadConfigToDetail(data, hpdata)
local hpData = configData.hpData or hpdata
if type(hpData) == 'string' then
hpData = json.decode(hpData)
if hpData == "null" then
hpData = nil
else
hpData = json.decode(hpData)
end
end
local returnString = ""
@ -193,54 +197,57 @@ function M:LoadConfigToDetail(data, hpdata)
end
returnString = string.format("%s人数%s人", returnString, configData.maxPlayers)
if configData.jiangma then
returnString = string.format("%s,%s马", returnString,
configData.jiangma == 0 and "不奖" or string.format("奖%s", configData.jiangma * 2))
end
if configData.zimo then
returnString = string.format("%s,%s", returnString, configData.zimo == 0 and "可点炮,可自摸" or "必须自摸")
end
if configData.shaozhuang then
returnString = string.format("%s%s", returnString, configData.shaozhuang == 0 and "" or ",烧庄")
returnString = string.format("%s%s", returnString, configData.shaozhuang == 0 and ",不烧庄" or ",烧庄")
end
if configData.fengding then
local matString = "%s%s"
if configData.fengding == 0 then
returnString = string.format(matString, returnString, ",封顶20炮")
else
returnString = string.format(matString, returnString, ",不封顶")
end
end
if configData.TianDiHu then
returnString = string.format("%s%s", returnString, configData.TianDiHu == 0 and ",有天地胡" or "")
returnString = string.format("%s%s", returnString, configData.TianDiHu == 0 and ",天地胡玩法" or ",没有天地胡")
end
if configData.jiangma then
returnString = string.format("%s,%s马", returnString,
configData.jiangma == 0 and "不奖" or string.format("奖%s", configData.jiangma * 2))
end
if configData.zikechengshun then
returnString = string.format("%s%s", returnString, configData.zikechengshun == 0 and ",有字可成顺" or "")
returnString = string.format("%s%s", returnString, configData.zikechengshun == 0 and ",字可成顺" or ",字不可成顺")
end
if configData.zuangfenfanbei then
returnString = string.format("%s%s", returnString, configData.zikechengshun == 0 and ",庄家积分翻倍" or "")
if configData.zhuangfenfanbei then
returnString = string.format("%s%s", returnString, configData.zikechengshun == 0 and ",庄家积分翻倍" or ",庄家积分不翻倍")
end
if configData.GPSDetection then
returnString = string.format("%s%s", returnString,
configData.GPSDetection == 0 and ",距离不限制" or string.format(",距离限制%s米", configData.GPSDetection))
return returnString
end
function M:LoadConfigToDetail(data, hpdata)
local configData = data
if type(data) == 'string' then
configData = json.decode(data)
end
if configData.tuoguan_active_time then
returnString = string.format("%s%s", returnString,
configData.tuoguan_active_time == 0 and ",不自动托管" or string.format(",%s秒托管", configData.tuoguan_active_time))
end
if hpData then
if hpData.JieShan then
returnString = string.format("%s%s", returnString,
hpData.JieShan == 1 and ",托管结束后不解散" or
string.format(",托管%s结束后强制解散", hpData.JieShan == 2 and "当局" or string.format("%s局", hpData.JieShan - 1)))
end
if hpData.BanChat then
returnString = string.format("%s%s", returnString, hpData.BanChat == 1 and ",不允许快捷聊天" or "")
end
if hpData.BanMissile then
returnString = string.format("%s%s", returnString, hpData.BanMissile == 1 and ",关闭互动表情" or "")
local hpData = configData.hpData or hpdata
if type(hpData) == 'string' then
if hpData == "null" then
hpData = nil
else
hpData = json.decode(hpData)
end
end
returnString = returnString .. IGameInfo.LoadConfigToDetail(self, data, hpdata)
local returnString = ""
returnString = returnString .. self:LoadConfigToDetailOnlyPlay(data, hpdata)
returnString = returnString .. IGameInfo.LoadConfigToDetail(self, configData, hpData)
return returnString
end

View File

@ -57,11 +57,6 @@ function M:InitView(url)
--[[
MJMainView.InitView(self, "ui://Main_Majiang/Main_new_" .. room.room_config.people_num)
--]]
local config = ExtendManager.GetExtendConfig(room.game_id)
local mode = config:GetGameInfo()
local gamePlay = mode:LoadConfigToDetail(json.encode(room.room_config.config),
json.encode(room.room_config.config.hpData))
self._view:GetChild('wanfa_text').text = gamePlay
self.jing = self._view:GetChild('jing')
@ -573,14 +568,14 @@ function M:OutCard(card)
self:RemoveCursor()
info:UpdateHandCard()
info:UpdateOutCardList(nil, card, self._cursor)
info._ctr_tip.selectedIndex = 0
info._ctr_showGuoHu.selectedIndex = 0
self:markOutCards(false, card)
self:PlaySound("FuZhou_MJ", self._room.self_player.self_user.sex, tostring(card))
self:PlayMJSound("chupai.mp3")
-- self:ShowHuTip()
end)
info:UpdateOutCardList(nil, card, self._cursor)
info._ctr_tip.selectedIndex = 0
info._ctr_showGuoHu.selectedIndex = 0
self:markOutCards(false, card)
self:PlaySound("FuZhou_MJ", self._room.self_player.self_user.sex, tostring(card))
self:PlayMJSound("chupai.mp3")
-- self:ShowHuTip()
end)
else
printlog("鬼牌不能出===>>>" .. card)
end

View File

@ -20,17 +20,13 @@ end
function M:InitView(url)
local room = self._room
UIPackage.AddPackage("extend/majiang/fuzhou/ui/Extend_MJ_FuZhou")
MJPlayBackView.InitView(self, string.format("ui://Main_Majiang/Main_new_%d_jiangxi", room.room_config.people_num))
MJPlayBackView.InitView(self, string.format("ui://Main_Majiang/Main_new_%d_jiangxi", room.room_config.people_num))
local _cardbox = self._view:GetChild("cardbox")
--self._view:GetChild("panel_record"):GetChild("btn_LastStep").enabled = false
self._ctr_cardbox = _cardbox:GetController("c1")
self._tex_round = self._view:GetChild("tex_round")
self._tex_LeftCard = self._view:GetChild("remaining_card")
self._anchor = self._view:GetChild("mask_tips")
local config = ExtendManager.GetExtendConfig(room.game_id)
local mode = config:GetGameInfo()
local gamePlay = mode:LoadConfigToDetail(json.encode(room.room_config.config), json.encode(room.room_config.hpData))
self._view:GetChild('wanfa_text').text = gamePlay
self._eventmap = {}
self._cmdmap = {}
@ -41,7 +37,7 @@ function M:InitView(url)
self._cmdmap[Record_Event.Evt_Niao] = self.CmdNiao
self._cmdmap[Record_Event.Evt_Piao] = self.CmdPiao
self._cmdmap[Record_Event.Evt_Result] = self.CmdResult
self.com_logocType.selectedIndex = 0
self.com_logocType.selectedIndex = 0
end
function M:FillRoomData(data)
@ -60,14 +56,14 @@ function M:FillRoomData(data)
roominfo_panel:GetChild("tex_roomid").text = room.room_id
roominfo_panel:GetChild("tex_gametype").text = room.room_config:GetGameName()
for i = 1, #room.player_list do
local p = room.player_list[i]
local card_info = _player_card_info[self:GetPos(p.seat)]
-- card_info:Clear()
table.sort(p.card_list, self.HandCardSortAndJing)
card_info:UpdateHandCard(false, true)
self._player_info[i]._view:GetController("piao_niao").selectedIndex = 0
end
for i = 1, #room.player_list do
local p = room.player_list[i]
local card_info = _player_card_info[self:GetPos(p.seat)]
-- card_info:Clear()
table.sort(p.card_list, self.HandCardSortAndJing)
card_info:UpdateHandCard(false, true)
self._player_info[i]._view:GetController("piao_niao").selectedIndex = 0
end
self:GenerateAllStepData(data)
self:UpdateStep(1)
@ -115,8 +111,8 @@ function M:ShowStep(index)
if step.cmd == Record_Event.Evt_Win then
self._win_pic = UIPackage.CreateObjectFromURL("ui://Main_Majiang/胡")
local info = self._player_card_info[self:GetPos(step.win)]
info._view:AddChild(self._win_pic)
self._win_pic:Center()
info._view:AddChild(self._win_pic)
self._win_pic:Center()
else
if self._win_pic then
self._win_pic:Dispose()
@ -129,7 +125,7 @@ function M:ShowStep(index)
list:RemoveChildrenToPool()
for i = 1, #niao_list do
local item = list:AddItemFromPool()
item.icon = UIPackage.GetItemURL("Main_Majiang", "b201_" .. niao_list[i].card)
item.icon = UIPackage.GetItemURL("Main_Majiang", "b201_" .. niao_list[i].card)
if niao_list[i].score > 0 then
item:GetController("bg").selectedIndex = 2
end
@ -143,25 +139,25 @@ function M:ShowStep(index)
end
end
if step.cmd == Record_Event.Evt_Result then
if not self.result then
self.result = EXClearingView.new(self._root_view, { flag_back = true })
self.result:InitData(0, self._room, step.result_data)
self.result._view.x = (GRoot.inst.width - self.result._view.width) * -0.5
self.result._view.width = GRoot.inst.width
self.result._view.height = GRoot.inst.height
-- self.result._view:GetChild("btn_confirm").visible = false
self._anchor:AddChild(self.result._view)
self.result._view.x = self._anchor.x * -1
self.result._view.y = self._anchor.y * -1
else
self.result._view.visible = true
end
-- self.result._view:Center()
-- else
-- if self.result then
-- self.result._view.visible = false
-- end
end
if not self.result then
self.result = EXClearingView.new(self._root_view, { flag_back = true })
self.result:InitData(0, self._room, step.result_data)
self.result._view.x = (GRoot.inst.width - self.result._view.width) * -0.5
self.result._view.width = GRoot.inst.width
self.result._view.height = GRoot.inst.height
-- self.result._view:GetChild("btn_confirm").visible = false
self._anchor:AddChild(self.result._view)
self.result._view.x = self._anchor.x * -1
self.result._view.y = self._anchor.y * -1
else
self.result._view.visible = true
end
-- self.result._view:Center()
-- else
-- if self.result then
-- self.result._view.visible = false
-- end
end
end
function M:GenerateAllStepData(data)
@ -292,8 +288,8 @@ function M:UpdateCardBox(seat)
end
function M:UpdateRound()
self._view:GetChild("text_round").text = string.format("局数:%d /%d", self._room.curren_round,
self._room.room_config.round)
self._view:GetChild("text_round").text = string.format("局数:%d /%d", self._room.curren_round,
self._room.room_config.round)
end
function M:UpdateStep(step)

View File

@ -46,13 +46,9 @@ function M:InitView()
self._anchor = self._view:GetChild("mask_tips")
------------------渲染桌面信息--------------------------
local config = ExtendManager.GetExtendConfig(room.game_id)
local mode = config:GetGameInfo()
local gamePlay = mode:LoadConfigToDetail(json.encode(room.room_config.config), json.encode(room.room_config.hpData))
self._view:GetChild('text_time').text = os.date("%H:%M", os.time())
self._view:GetChild('text_roomId').text = room.room_id
self._view:GetChild('wanfa_text').text = gamePlay
self._state = self._view:GetController("state")
self._text_remined = self._view:GetChild('remaining_card')
@ -352,7 +348,7 @@ function M:EventInit()
info._view:GetController("text_color").selectedIndex = 1
info._view:GetChild("text_jifen").text = num
end
info._view:GetChild("mask_piao").title = ""
info._view:GetController("piao_niao").selectedIndex = 0
p.fz_list = {}
@ -396,17 +392,17 @@ function M:EventInit()
print("lingmeng witness EventResidueCard")
end)
--替换mianview的事件
_gamectr:AddEventListener(
GameEvent.PlayerState,
function(...)
printlog("lingmeng OnEventOnlineState")
local arg = { ... }
local p = arg[1]
local info = self._player_info[self:GetPos(p.seat)]
info._ctr_offline.selectedIndex = p.line_state == 0 and 1 or 0
end
)
--替换mianview的事件
_gamectr:AddEventListener(
GameEvent.PlayerState,
function(...)
printlog("lingmeng OnEventOnlineState")
local arg = { ... }
local p = arg[1]
local info = self._player_info[self:GetPos(p.seat)]
info._ctr_offline.selectedIndex = p.line_state == 0 and 1 or 0
end
)
end
function M:InitPlayerInfoView()
@ -414,7 +410,7 @@ function M:InitPlayerInfoView()
local _player_info = self._player_info
for i = 1, self._room.room_config.people_num do
local tem = self._view:GetChild(string.format("player_info%d_2", i))
_player_info[i] = PlayerInfoView.new(tem, self,true)
_player_info[i] = PlayerInfoView.new(tem, self, true)
tem.visible = false
end
end

View File

@ -86,9 +86,14 @@ function M:InitData(over, room, result, total_result, callback, isWitness, witne
end
self:DestroyWithCallback()
else
local _gamectr = ControllerManager.GetController(GameController)
_gamectr:PlayerReady()
self:DestroyWithCallback()
if over == 0 then
local _gamectr = ControllerManager.GetController(GameController)
_gamectr:PlayerReady()
self:DestroyWithCallback()
else
mainCtr.selectedIndex = 1
_overCtr.selectedIndex = 1
end
end
end)
@ -115,15 +120,15 @@ function M:InitData(over, room, result, total_result, callback, isWitness, witne
end
end)
elseif over == 1 then
mainCtr.selectedIndex = 1
showBtnTypeCtr.selectedIndex = 1
self:fillResult1(room, peopleNum, total_result)
if result then
_overCtr.selectedIndex = 0
self:fillResult0(room, peopleNum, result)
nextRoundBtn2.onClick:Set(function()
_overCtr.selectedIndex = 1
end)
else
showBtnTypeCtr.selectedIndex = 1
_overCtr.selectedIndex = 1
end
else --解散房间如果没有开局直接退出不显示结算界面over=2

View File

@ -172,16 +172,19 @@ function M:LoadConfigData(data)
self._config:GetChild("n93").text = string.format("奖%s马", data.jiangma * 2)
end
function M:LoadConfigToDetail(data, hpdata)
function M:LoadConfigToDetailOnlyPlay(data, hpdata)
local configData = data
if type(data) == 'string' then
configData = json.decode(data)
end
pt("lingemng", data)
local hpData = configData.hpData or hpdata
if type(hpData) == 'string' then
hpData = json.decode(hpData)
if hpData == "null" then
hpData = nil
else
hpData = json.decode(hpData)
end
end
local returnString = ""
@ -190,58 +193,56 @@ function M:LoadConfigToDetail(data, hpdata)
end
returnString = string.format("%s人数%s人", returnString, configData.maxPlayers)
if configData.jiangma then
returnString = string.format("%s,%s马", returnString,
configData.jiangma == 0 and "不奖" or string.format("奖%s", configData.jiangma * 2))
end
if configData.zimo then
returnString = string.format("%s,%s", returnString, configData.zimo == 0 and "可点炮,可自摸" or "必须自摸")
end
if configData.shaozhuang then
returnString = string.format("%s%s", returnString, configData.shaozhuang == 0 and "" or ",有烧庄")
end
if configData.fengding then
local matString = "%s,%s"
if configData.fengding == 0 then
returnString = string.format(matString, returnString, "封顶20炮")
elseif configData.fengding == 1 then
returnString = string.format(matString, returnString, "封顶10炮")
else
returnString = string.format(matString, returnString, "不封顶")
end
end
if configData.TianDiHu then
returnString = string.format("%s%s", returnString, configData.TianDiHu == 0 and ",有天地胡" or "")
end
if configData.zikechengshun then
returnString = string.format("%s%s", returnString, configData.zikechengshun == 0 and ",有字可成顺" or "")
if configData.jiangma then
returnString = string.format("%s,%s马", returnString,
configData.jiangma == 0 and "不奖" or string.format("奖%s", configData.jiangma * 2))
end
if configData.gangjiangma then
returnString = string.format("%s%s", returnString, configData.gangjiangma == 0 and ",杠算奖马" or "")
returnString = string.format("%s%s", returnString, configData.gangjiangma == 0 and ",杠算奖马" or ",杠不算奖马")
end
if configData.sanjingjiangma then
returnString = string.format("%s%s", returnString, configData.sanjingjiangma == 0 and ",三精算奖马" or "")
returnString = string.format("%s%s", returnString, configData.sanjingjiangma == 0 and ",三精算奖马" or ",三精不算奖马")
end
if configData.GPSDetection then
returnString = string.format("%s%s", returnString,
configData.GPSDetection == 0 and ",距离不限制" or string.format(",距离限制%s米", configData.GPSDetection))
if configData.zikechengshun then
returnString = string.format("%s%s", returnString, configData.zikechengshun == 0 and ",字可成顺" or ",字不可成顺")
end
if configData.tuoguan_active_time then
returnString = string.format("%s%s", returnString,
configData.tuoguan_active_time == 0 and ",不自动托管" or string.format(",%s秒托管", configData.tuoguan_active_time))
return returnString
end
function M:LoadConfigToDetail(data, hpdata)
local configData = data
if type(data) == 'string' then
configData = json.decode(data)
end
if hpData then
if hpData.JieShan then
returnString = string.format("%s%s", returnString,
hpData.JieShan == 1 and ",托管结束后不解散" or
string.format(",托管%s结束后强制解散", hpData.JieShan == 2 and "当局" or string.format("%s局", hpData.JieShan - 1)))
end
if hpData.BanChat then
returnString = string.format("%s%s", returnString, hpData.BanChat == 1 and ",不允许快捷聊天" or "")
end
if hpData.BanMissile then
returnString = string.format("%s%s", returnString, hpData.BanMissile == 1 and ",关闭互动表情" or "")
local hpData = configData.hpData or hpdata
if type(hpData) == 'string' then
if hpData == "null" then
hpData = nil
else
hpData = json.decode(hpData)
end
end
returnString = returnString .. IGameInfo.LoadConfigToDetail(self, data, hpData)
local returnString = ""
returnString = returnString .. self:LoadConfigToDetailOnlyPlay(data, hpdata)
returnString = returnString .. IGameInfo.LoadConfigToDetail(self, configData, hpData)
return returnString
end

View File

@ -57,10 +57,6 @@ function M:InitView(url)
--[[
MJMainView.InitView(self, "ui://Main_Majiang/Main_new_" .. room.room_config.people_num)
--]]
local config = ExtendManager.GetExtendConfig(room.game_id)
local mode = config:GetGameInfo()
local gamePlay = mode:LoadConfigToDetail(json.encode(room.room_config.config), json.encode(room.room_config.hpData))
self._view:GetChild('wanfa_text').text = gamePlay
self.jing = self._view:GetChild('jing')
self._state.onChanged:Add(function()
@ -265,9 +261,9 @@ function M:EventInit()
info:UpdateHandCard()
local outcard = UIPackage.CreateObjectFromURL(_gcm_outcard_url)
info:UpdateOutCardList(outcard, card, self._cursor)
self:PlayMJSound("chupai.mp3")
self:PlaySound("JinXi_MJ", p.self_user.sex, tostring(card))
self:PlaySound("JinXi_MJ", p.self_user.sex, tostring(card))
if seat == _room.self_player.seat then
_room.curren_outcard_seat = -1
end
@ -574,14 +570,14 @@ function M:OutCard(card)
self:RemoveCursor()
info:UpdateHandCard()
info:UpdateOutCardList(nil, card, self._cursor)
info._ctr_tip.selectedIndex = 0
info._ctr_showGuoHu.selectedIndex = 0
self:markOutCards(false, card)
self:PlaySound("JinXi_MJ", self._room.self_player.self_user.sex, tostring(card))
self:PlayMJSound("chupai.mp3")
-- self:ShowHuTip()
end)
info:UpdateOutCardList(nil, card, self._cursor)
info._ctr_tip.selectedIndex = 0
info._ctr_showGuoHu.selectedIndex = 0
self:markOutCards(false, card)
self:PlaySound("JinXi_MJ", self._room.self_player.self_user.sex, tostring(card))
self:PlayMJSound("chupai.mp3")
-- self:ShowHuTip()
end)
else
printlog("鬼牌不能出===>>>" .. card)
end

View File

@ -27,10 +27,6 @@ function M:InitView(url)
self._tex_round = self._view:GetChild("tex_round")
self._tex_LeftCard = self._view:GetChild("remaining_card")
self._anchor = self._view:GetChild("mask_tips")
local config = ExtendManager.GetExtendConfig(room.game_id)
local mode = config:GetGameInfo()
local gamePlay = mode:LoadConfigToDetail(json.encode(room.room_config.config), json.encode(room.room_config.hpData))
self._view:GetChild('wanfa_text').text = gamePlay
self._eventmap = {}
self._cmdmap = {}
@ -41,7 +37,7 @@ function M:InitView(url)
self._cmdmap[Record_Event.Evt_Niao] = self.CmdNiao
self._cmdmap[Record_Event.Evt_Piao] = self.CmdPiao
self._cmdmap[Record_Event.Evt_Result] = self.CmdResult
self.com_logocType.selectedIndex = 3
self.com_logocType.selectedIndex = 3
end
function M:FillRoomData(data)
@ -60,14 +56,14 @@ function M:FillRoomData(data)
roominfo_panel:GetChild("tex_roomid").text = room.room_id
roominfo_panel:GetChild("tex_gametype").text = room.room_config:GetGameName()
for i = 1, #room.player_list do
local p = room.player_list[i]
local card_info = _player_card_info[self:GetPos(p.seat)]
-- card_info:Clear()
table.sort(p.card_list, self.HandCardSortAndJing)
card_info:UpdateHandCard(false, true)
self._player_info[i]._view:GetController("piao_niao").selectedIndex = 0
end
for i = 1, #room.player_list do
local p = room.player_list[i]
local card_info = _player_card_info[self:GetPos(p.seat)]
-- card_info:Clear()
table.sort(p.card_list, self.HandCardSortAndJing)
card_info:UpdateHandCard(false, true)
self._player_info[i]._view:GetController("piao_niao").selectedIndex = 0
end
self:GenerateAllStepData(data)
self:UpdateStep(1)
@ -115,7 +111,7 @@ function M:ShowStep(index)
if step.cmd == Record_Event.Evt_Win then
self._win_pic = UIPackage.CreateObjectFromURL("ui://Main_Majiang/胡")
local info = self._player_card_info[self:GetPos(step.win)]
info._view:AddChild(self._win_pic)
info._view:AddChild(self._win_pic)
self._win_pic:Center()
else
if self._win_pic then
@ -129,7 +125,7 @@ function M:ShowStep(index)
list:RemoveChildrenToPool()
for i = 1, #niao_list do
local item = list:AddItemFromPool()
item.icon = UIPackage.GetItemURL("Main_Majiang", "b201_" .. niao_list[i].card)
item.icon = UIPackage.GetItemURL("Main_Majiang", "b201_" .. niao_list[i].card)
if niao_list[i].score > 0 then
item:GetController("bg").selectedIndex = 2
end
@ -144,24 +140,24 @@ function M:ShowStep(index)
end
if step.cmd == Record_Event.Evt_Result then
if not self.result then
self.result = EXClearingView.new(self._root_view, { flag_back = true })
self.result:InitData(0, self._room, step.result_data)
self.result._view.x = (GRoot.inst.width - self.result._view.width) * -0.5
self.result._view.width = GRoot.inst.width
self.result._view.height = GRoot.inst.height
-- self.result._view:GetChild("btn_confirm").visible = false
self._anchor:AddChild(self.result._view)
self.result._view.x = self._anchor.x * -1
self.result._view.y = self._anchor.y * -1
else
self.result._view.visible = true
end
-- self.result._view:Center()
-- else
-- if self.result then
-- self.result._view.visible = false
-- end
end
self.result = EXClearingView.new(self._root_view, { flag_back = true })
self.result:InitData(0, self._room, step.result_data)
self.result._view.x = (GRoot.inst.width - self.result._view.width) * -0.5
self.result._view.width = GRoot.inst.width
self.result._view.height = GRoot.inst.height
-- self.result._view:GetChild("btn_confirm").visible = false
self._anchor:AddChild(self.result._view)
self.result._view.x = self._anchor.x * -1
self.result._view.y = self._anchor.y * -1
else
self.result._view.visible = true
end
-- self.result._view:Center()
-- else
-- if self.result then
-- self.result._view.visible = false
-- end
end
end
function M:GenerateAllStepData(data)
@ -292,8 +288,8 @@ function M:UpdateCardBox(seat)
end
function M:UpdateRound()
self._view:GetChild("text_round").text = string.format("局数:%d /%d", self._room.curren_round,
self._room.room_config.round)
self._view:GetChild("text_round").text = string.format("局数:%d /%d", self._room.curren_round,
self._room.room_config.round)
end
function M:UpdateStep(step)

View File

@ -46,13 +46,9 @@ function M:InitView(url)
self._anchor = self._view:GetChild("mask_tips")
------------------渲染桌面信息--------------------------
local config = ExtendManager.GetExtendConfig(room.game_id)
local mode = config:GetGameInfo()
local gamePlay = mode:LoadConfigToDetail(json.encode(room.room_config.config), json.encode(room.room_config.hpData))
self._view:GetChild('text_time').text = os.date("%H:%M", os.time())
self._view:GetChild('text_roomId').text = room.room_id
self._view:GetChild('wanfa_text').text = gamePlay
self._state = self._view:GetController("state")
self._text_remined = self._view:GetChild('remaining_card')
@ -352,7 +348,7 @@ function M:EventInit()
info._view:GetController("text_color").selectedIndex = 1
info._view:GetChild("text_jifen").text = num
end
info._view:GetChild("mask_piao").title = ""
info._view:GetController("piao_niao").selectedIndex = 0
p.fz_list = {}
@ -396,17 +392,17 @@ function M:EventInit()
print("lingmeng witness EventResidueCard")
end)
--替换mianview的事件
_gamectr:AddEventListener(
GameEvent.PlayerState,
function(...)
printlog("lingmeng OnEventOnlineState")
local arg = { ... }
local p = arg[1]
local info = self._player_info[self:GetPos(p.seat)]
info._ctr_offline.selectedIndex = p.line_state == 0 and 1 or 0
end
)
--替换mianview的事件
_gamectr:AddEventListener(
GameEvent.PlayerState,
function(...)
printlog("lingmeng OnEventOnlineState")
local arg = { ... }
local p = arg[1]
local info = self._player_info[self:GetPos(p.seat)]
info._ctr_offline.selectedIndex = p.line_state == 0 and 1 or 0
end
)
end
function M:InitPlayerInfoView()
@ -414,7 +410,7 @@ function M:InitPlayerInfoView()
local _player_info = self._player_info
for i = 1, self._room.room_config.people_num do
local tem = self._view:GetChild(string.format("player_info%d_2", i))
_player_info[i] = PlayerInfoView.new(tem, self,true)
_player_info[i] = PlayerInfoView.new(tem, self, true)
tem.visible = false
end
end

View File

@ -87,9 +87,14 @@ function M:InitData(over, room, result, total_result, callback, isWitness, witne
end
self:DestroyWithCallback()
else
local _gamectr = ControllerManager.GetController(GameController)
_gamectr:PlayerReady()
self:DestroyWithCallback()
if over == 0 then
local _gamectr = ControllerManager.GetController(GameController)
_gamectr:PlayerReady()
self:DestroyWithCallback()
else
mainCtr.selectedIndex = 1
_overCtr.selectedIndex = 1
end
end
end)
@ -114,15 +119,15 @@ function M:InitData(over, room, result, total_result, callback, isWitness, witne
end
end)
elseif over == 1 then
mainCtr.selectedIndex = 1
showBtnTypeCtr.selectedIndex = 1
self:fillResult1(room, peopleNum, total_result)
if result then
_overCtr.selectedIndex = 0
self:fillResult0(room, peopleNum, result)
nextRoundBtn2.onClick:Set(function()
_overCtr.selectedIndex = 1
end)
else
showBtnTypeCtr.selectedIndex = 1
_overCtr.selectedIndex = 1
end
else --解散房间如果没有开局直接退出不显示结算界面over=2

View File

@ -307,7 +307,7 @@ function M:OnEventFzAction(evt_data)
end
p.hand_left_count = p.hand_left_count - remove_num
if from_seat ~= p.seat then
if from_seat ~= p.seat and ftype ~= FZType.Gang_Peng then
-- if (fz.Type == FZType.Chi) then card = actice_card end
local fp = _room:GetPlayerBySeat(from_seat)
table.remove(fp.outcard_list, #fp.outcard_list)

View File

@ -157,16 +157,19 @@ function M:LoadConfigData(data)
_config:GetController("jingbibo").selectedIndex = 1 - data.jingbibo
end
function M:LoadConfigToDetail(data, hpdata)
function M:LoadConfigToDetailOnlyPlay(data, hpdata)
local configData = data
if type(data) == 'string' then
configData = json.decode(data)
end
pt("lingemng", data)
local hpData = configData.hpData or hpdata
if type(hpData) == 'string' then
hpData = json.decode(hpData)
if hpData == "null" then
hpData = nil
else
hpData = json.decode(hpData)
end
end
local returnString = ""
@ -176,33 +179,36 @@ function M:LoadConfigToDetail(data, hpdata)
returnString = string.format("%s人数%s人", returnString, configData.maxPlayers)
returnString = string.format("%s,%s,%s,%s", returnString,
configData.zimo == 0 and "可点炮,可自摸" or "必须自摸",
configData.tuoguan == 0 and string.format("%d秒后自动托管", configData.tuoguan_active_time) or "不能托管",
configData.jingbibo == 1 and "有精必博" or "有精可胡")
if configData.zimo then
returnString = string.format("%s,%s", returnString, configData.zimo == 0 and "可点炮,可自摸" or "必须自摸")
end
if configData.jingbibo then
returnString = string.format("%s,%s", returnString, configData.jingbibo == 1 and "有精必博" or "有精可胡")
end
if configData.GPSDetection then
returnString = string.format("%s%s", returnString,
configData.GPSDetection == 0 and ",距离不限制" or string.format(",距离限制%s米", configData.GPSDetection))
return returnString
end
function M:LoadConfigToDetail(data, hpdata)
local configData = data
if type(data) == 'string' then
configData = json.decode(data)
end
if configData.tuoguan_active_time then
returnString = string.format("%s%s", returnString,
configData.tuoguan_active_time == 0 and ",不自动托管" or string.format(",%s秒托管", configData.tuoguan_active_time))
end
if hpData then
if hpData.JieShan then
returnString = string.format("%s%s", returnString,
hpData.JieShan == 1 and ",托管结束后不解散" or
string.format(",托管%s结束后强制解散", hpData.JieShan == 2 and "当局" or string.format("%s局", hpData.JieShan - 1)))
end
if hpData.BanChat then
returnString = string.format("%s%s", returnString, hpData.BanChat == 1 and ",不允许快捷聊天" or "")
end
if hpData.BanMissile then
returnString = string.format("%s%s", returnString, hpData.BanMissile == 1 and ",关闭互动表情" or "")
local hpData = configData.hpData or hpdata
if type(hpData) == 'string' then
if hpData == "null" then
hpData = nil
else
hpData = json.decode(hpData)
end
end
returnString = returnString .. IGameInfo.LoadConfigToDetail(self, data, hpData)
local returnString = ""
returnString = returnString .. self:LoadConfigToDetailOnlyPlay(data, hpdata)
returnString = returnString .. IGameInfo.LoadConfigToDetail(self, configData, hpData)
return returnString
end

View File

@ -57,10 +57,6 @@ function M:InitView(url)
--[[
MJMainView.InitView(self, "ui://Main_Majiang/Main_new_" .. room.room_config.people_num)
--]]
local config = ExtendManager.GetExtendConfig(room.game_id)
local mode = config:GetGameInfo()
local gamePlay = mode:LoadConfigToDetail(json.encode(room.room_config.config), json.encode(room.room_config.hpData))
self._view:GetChild('wanfa_text').text = gamePlay
self.jing = self._view:GetChild('jing')
@ -481,9 +477,6 @@ function M:EventInit()
local total_result = arg[2]
local result = arg[1]
local over = arg[3]
-- if over < 2 or _room.curren_round > 0 then
-- self:PlayMJSound("end_music.mp3")
-- end
self._clearingView = EXClearingView.new()
coroutine.start(function()
coroutine.wait(0.5)

View File

@ -27,10 +27,6 @@ function M:InitView(url)
self._tex_round = self._view:GetChild("tex_round")
self._tex_LeftCard = self._view:GetChild("remaining_card")
self._anchor = self._view:GetChild("mask_tips")
local config = ExtendManager.GetExtendConfig(room.game_id)
local mode = config:GetGameInfo()
local gamePlay = mode:LoadConfigToDetail(json.encode(room.room_config.config), json.encode(room.room_config.hpData))
self._view:GetChild('wanfa_text').text = gamePlay
self._eventmap = {}
self._cmdmap = {}
@ -41,8 +37,8 @@ function M:InitView(url)
self._cmdmap[Record_Event.Evt_Niao] = self.CmdNiao
self._cmdmap[Record_Event.Evt_Piao] = self.CmdPiao
self._cmdmap[Record_Event.Evt_Result] = self.CmdResult
self.com_logocType.selectedIndex = 2
self.com_logocType.selectedIndex = 2
end
function M:FillRoomData(data)

View File

@ -47,13 +47,9 @@ function M:InitView()
self._anchor = self._view:GetChild("mask_tips")
------------------渲染桌面信息--------------------------
local config = ExtendManager.GetExtendConfig(room.game_id)
local mode = config:GetGameInfo()
local gamePlay = mode:LoadConfigToDetail(json.encode(room.room_config.config), json.encode(room.room_config.hpData))
self._view:GetChild('text_time').text = os.date("%H:%M", os.time())
self._view:GetChild('text_roomId').text = room.room_id
self._view:GetChild('wanfa_text').text = gamePlay
self._state = self._view:GetController("state")
self._text_remined = self._view:GetChild('remaining_card')

View File

@ -86,9 +86,14 @@ function M:InitData(over, room, result, total_result, callback, isWitness, witne
end
self:DestroyWithCallback()
else
local _gamectr = ControllerManager.GetController(GameController)
_gamectr:PlayerReady()
self:DestroyWithCallback()
if over == 0 then
local _gamectr = ControllerManager.GetController(GameController)
_gamectr:PlayerReady()
self:DestroyWithCallback()
else
mainCtr.selectedIndex = 1
_overCtr.selectedIndex = 1
end
end
end)
@ -113,15 +118,15 @@ function M:InitData(over, room, result, total_result, callback, isWitness, witne
end
end)
elseif over == 1 then
mainCtr.selectedIndex = 1
showBtnTypeCtr.selectedIndex = 1
self:fillResult1(room, peopleNum, total_result)
if result then
_overCtr.selectedIndex = 0
self:fillResult0(room, peopleNum, result)
nextRoundBtn2.onClick:Set(function()
_overCtr.selectedIndex = 1
end)
else
showBtnTypeCtr.selectedIndex = 1
_overCtr.selectedIndex = 1
end
else --解散房间如果没有开局直接退出不显示结算界面over=2

View File

@ -185,16 +185,19 @@ function M:LoadConfigData(data)
-- end
end
function M:LoadConfigToDetail(data, hpdata)
function M:LoadConfigToDetailOnlyPlay(data, hpdata)
local configData = data
if type(data) == 'string' then
configData = json.decode(data)
end
pt("lingemng", data)
local hpData = configData.hpData or hpdata
if type(hpData) == 'string' then
hpData = json.decode(hpData)
if hpData == "null" then
hpData = nil
else
hpData = json.decode(hpData)
end
end
local returnString = ""
@ -204,37 +207,55 @@ function M:LoadConfigToDetail(data, hpdata)
returnString = string.format("%s人数%s人", returnString, configData.maxPlayers)
returnString = string.format("%s,%s马%s%s%s%s%s%s,%s", returnString,
configData.jiangma and string.format("奖%d", configData.jiangma * 2) or "不奖",
configData.shaozhuang == 1 and ",有烧庄" or "",
configData.zuoma == 0 and ",庄家坐马" or "",
configData.zimo == 0 and ",可点炮,可自摸" or ",必须自摸",
configData.tuoguan and string.format(",%d秒后自动托管", configData.tuoguan_active_time) or ",不能托管",
configData.jiahu == 0 and ",可以假胡" or "", configData.fengding == 0 and ",封顶20炮" or "",
configData.zhuanwan == 0 and "大转弯" or "小转弯")
if configData.zimo then
returnString = string.format("%s,%s", returnString, configData.zimo == 0 and "可点炮,可自摸" or "必须自摸")
end
if configData.shaozhuang then
returnString = string.format("%s,%s", returnString, configData.shaozhuang == 0 and "不烧庄" or "烧庄")
end
if configData.fengding then
local matString = "%s,%s"
if configData.fengding == 0 then
returnString = string.format(matString, returnString, "封顶20炮")
else
returnString = string.format(matString, returnString, "不封顶")
end
end
if configData.jiangma then
returnString = string.format("%s,%s马", returnString,
configData.jiangma == 0 and "不奖" or string.format("奖%s", configData.jiangma * 2))
end
if configData.zuoma then
returnString = string.format("%s,%s", returnString, configData.zuoma == 0 and "庄家坐马" or "庄家不坐马")
end
if configData.tuoguan then
returnString = string.format("%s,%s", returnString, configData.zhuanwan == 0 and "大转弯" or "小转弯")
end
if configData.jiahu then
returnString = string.format("%s,%s", returnString, configData.jiahu == 0 and "算假胡" or "不算假胡")
end
return returnString
end
if configData.GPSDetection then
returnString = string.format("%s%s", returnString,
configData.GPSDetection == 0 and ",距离不限制" or string.format(",距离限制%s米", configData.GPSDetection))
function M:LoadConfigToDetail(data, hpdata)
local configData = data
if type(data) == 'string' then
configData = json.decode(data)
end
if configData.tuoguan_active_time then
returnString = string.format("%s%s", returnString,
configData.tuoguan_active_time == 0 and ",不自动托管" or string.format(",%s秒托管", configData.tuoguan_active_time))
end
if hpData then
if hpData.JieShan then
returnString = string.format("%s%s", returnString,
hpData.JieShan == 1 and ",托管结束后不解散" or
string.format(",托管%s结束后强制解散", hpData.JieShan == 2 and "当局" or string.format("%s局", hpData.JieShan - 1)))
end
if hpData.BanChat then
returnString = string.format("%s%s", returnString, hpData.BanChat == 1 and ",不允许快捷聊天" or "")
end
if hpData.BanMissile then
returnString = string.format("%s%s", returnString, hpData.BanMissile == 1 and ",关闭互动表情" or "")
local hpData = configData.hpData or hpdata
if type(hpData) == 'string' then
if hpData == "null" then
hpData = nil
else
hpData = json.decode(hpData)
end
end
returnString = returnString .. IGameInfo.LoadConfigToDetail(self, data, hpData)
local returnString = ""
returnString = returnString .. self:LoadConfigToDetailOnlyPlay(data, hpdata)
returnString = returnString .. IGameInfo.LoadConfigToDetail(self, configData, hpData)
return returnString
end

View File

@ -56,10 +56,6 @@ function M:InitView(url)
--[[
MJMainView.InitView(self, "ui://Main_Majiang/Main_new_" .. room.room_config.people_num)
--]]
local config = ExtendManager.GetExtendConfig(room.game_id)
local mode = config:GetGameInfo()
local gamePlay = mode:LoadConfigToDetail(json.encode(room.room_config.config), json.encode(room.room_config.hpData))
self._view:GetChild('wanfa_text').text = gamePlay
self.jing = self._view:GetChild('jing')
self._state.onChanged:Add(function()
@ -573,14 +569,14 @@ function M:OutCard(card)
self:RemoveCursor()
info:UpdateHandCard()
info:UpdateOutCardList(nil, card, self._cursor)
info._ctr_tip.selectedIndex = 0
info._ctr_showGuoHu.selectedIndex = 0
self:markOutCards(false, card)
self:PlaySound("NanCheng_MJ", self._room.self_player.self_user.sex, tostring(card))
self:PlayMJSound("chupai.mp3")
-- self:ShowHuTip()
end)
info:UpdateOutCardList(nil, card, self._cursor)
info._ctr_tip.selectedIndex = 0
info._ctr_showGuoHu.selectedIndex = 0
self:markOutCards(false, card)
self:PlaySound("NanCheng_MJ", self._room.self_player.self_user.sex, tostring(card))
self:PlayMJSound("chupai.mp3")
-- self:ShowHuTip()
end)
else
printlog("鬼牌不能出===>>>" .. card)
end

View File

@ -27,11 +27,6 @@ function M:InitView(url)
self._tex_round = self._view:GetChild("tex_round")
self._tex_LeftCard = self._view:GetChild("remaining_card")
self._anchor = self._view:GetChild("mask_tips")
local config = ExtendManager.GetExtendConfig(room.game_id)
local mode = config:GetGameInfo()
local gamePlay = mode:LoadConfigToDetail(json.encode(room.room_config.config), json.encode(room.room_config.hpData))
self._view:GetChild('wanfa_text').text = gamePlay
self._eventmap = {}
self._cmdmap = {}
@ -42,7 +37,7 @@ function M:InitView(url)
self._cmdmap[Record_Event.Evt_Niao] = self.CmdNiao
self._cmdmap[Record_Event.Evt_Piao] = self.CmdPiao
self._cmdmap[Record_Event.Evt_Result] = self.CmdResult
self.com_logocType.selectedIndex = 1
self.com_logocType.selectedIndex = 1
end
function M:FillRoomData(data)

View File

@ -46,13 +46,9 @@ function M:InitView()
self._anchor = self._view:GetChild("mask_tips")
------------------渲染桌面信息--------------------------
local config = ExtendManager.GetExtendConfig(room.game_id)
local mode = config:GetGameInfo()
local gamePlay = mode:LoadConfigToDetail(json.encode(room.room_config.config), json.encode(room.room_config.hpData))
self._view:GetChild('text_time').text = os.date("%H:%M", os.time())
self._view:GetChild('text_roomId').text = room.room_id
self._view:GetChild('wanfa_text').text = gamePlay
self._state = self._view:GetController("state")
self._text_remined = self._view:GetChild('remaining_card')
@ -352,7 +348,7 @@ function M:EventInit()
info._view:GetController("text_color").selectedIndex = 1
info._view:GetChild("text_jifen").text = num
end
info._view:GetChild("mask_piao").title = ""
info._view:GetController("piao_niao").selectedIndex = 0
p.fz_list = {}
@ -396,17 +392,17 @@ function M:EventInit()
print("lingmeng witness EventResidueCard")
end)
--替换mianview的事件
_gamectr:AddEventListener(
GameEvent.PlayerState,
function(...)
printlog("lingmeng OnEventOnlineState")
local arg = { ... }
local p = arg[1]
local info = self._player_info[self:GetPos(p.seat)]
info._ctr_offline.selectedIndex = p.line_state == 0 and 1 or 0
end
)
--替换mianview的事件
_gamectr:AddEventListener(
GameEvent.PlayerState,
function(...)
printlog("lingmeng OnEventOnlineState")
local arg = { ... }
local p = arg[1]
local info = self._player_info[self:GetPos(p.seat)]
info._ctr_offline.selectedIndex = p.line_state == 0 and 1 or 0
end
)
end
function M:InitPlayerInfoView()
@ -414,7 +410,7 @@ function M:InitPlayerInfoView()
local _player_info = self._player_info
for i = 1, self._room.room_config.people_num do
local tem = self._view:GetChild(string.format("player_info%d_2", i))
_player_info[i] = PlayerInfoView.new(tem, self,true)
_player_info[i] = PlayerInfoView.new(tem, self, true)
tem.visible = false
end
end

View File

@ -218,6 +218,12 @@ function M:InitView(url, use_custom_bg, custom_bg_config)
self:InitXiPai1()
self.btn_setting.onClick:Set(handler(self, self.ClickSetting))
local config = ExtendManager.GetExtendConfig(_room.game_id)
local mode = config:GetGameInfo()
local gamePlay = mode:LoadConfigToDetailOnlyPlay(json.encode(_room.room_config.config),
json.encode(_room.room_config.config.hpData))
self._view:GetChild('wanfa_text').text = gamePlay
end
function M:ClickSetting()
@ -831,7 +837,7 @@ function M:OnHuCard(...)
end)
coroutine.start(function()
coroutine.wait(0.5)
coroutine.wait(0.3)
loader_HuEffect.visible = false
local Effects = {}
@ -874,6 +880,13 @@ function M:OnHuCard(...)
end
end
--小于四个字段时动态调整胡特效
if info._viewText_cardInfo["huEffet_columnGap"] and #Effects < 4 then
list_HuCardEffect.columnGap = tonumber(info._viewText_cardInfo["huEffet_columnGap"])
else
list_HuCardEffect.columnGap = 0
end
-- ↓↓↓播放动画
for _, imgObj in pairs(Effects) do
imgObj.visible = true
@ -893,13 +906,15 @@ function M:OnHuCard(...)
coroutine.wait(0.5)
end
--根据字段动态调整间距
-- 扣分动画
for _, pScore in pairs(scoreData) do
local infoView = self._player_info[self:GetPos(pScore.seat)]
infoView:UpdateScore(pScore.total_score, true)
end
coroutine.wait(0.5)
coroutine.wait(0.3)
self._popEvent = true
list_HuCardEffect:RemoveChildrenToPool()
@ -942,8 +957,8 @@ function M:OnFangziAction(...)
self._popEvent = true
end)
self:RemoveCursor()
if (player.seat ~= fz.from_seat) then
if (player.seat ~= fz.from_seat and fz.type ~= FZType.Gang_Peng) then
self:RemoveCursor()
local fs_info = _player_card_info[self:GetPos(fz.from_seat)]
fs_info:UpdateOutCardList()
end
@ -970,7 +985,7 @@ function M:Show()
local win = GameInfoWindow.New()
win:Show(self._room)
end
self:PlayMJSound("game_backmusic.mp3")
self:PlayMJMusic("game_backmusic.mp3")
self:DoNoticeAnimation()
end

View File

@ -51,7 +51,8 @@ function M:FillRoomData()
local config = ExtendManager.GetExtendConfig(_room.game_id)
local mode = config:GetGameInfo()
local gamePlay = mode:LoadConfigToDetail(json.encode(_room.room_config.config), json.encode(_room.room_config.hpData))
local gamePlay = mode:LoadConfigToDetailOnlyPlay(json.encode(_room.room_config.config),
json.encode(_room.room_config.config.hpData))
self._view:GetChild('wanfa_text').text = gamePlay
end

View File

@ -49,6 +49,7 @@ end
function M:init()
local CardInfo = self._view:GetChild('Text_CardInfo')
printlog("lingmeng json text", CardInfo.text)
self._viewText_cardInfo = json.decode(CardInfo.text)
self._view_handCardList = self._view:GetChild('List_HandCard')
@ -509,6 +510,13 @@ function M:ShowHand(cards)
list:RemoveChildren(0, -1, true)
--list:RemoveChildren()
local passcard = false
if self._mainView:GetPos(self._player.seat) == 2 or self._mainView:GetPos(self._player.seat) == 3 then
local tem = {}
for i = #cards, 1, -1 do
table.insert(tem, cards[i])
end
cards = tem
end
for _, card in pairs(cards) do
if self.winCard == cards and passcard == false then
passcard = true

View File

@ -107,25 +107,42 @@ function M:init(url)
end
end)
self.slider_sound.value = GameApplication.Instance.SoundValue
self.slider_music.value = GameApplication.Instance.MusicValue
self.btn_sound.selected = GameApplication.Instance.SoundMute
self.btn_music.selected = GameApplication.Instance.MusicMute
self.slider_music.onChanged:Add(function()
GameApplication.Instance.MusicValue = self.slider_music.value
self.btn_music.selected = false
GameApplication.Instance.MusicMute = false;
local value = math.floor(self.slider_music.value)
if value > 0 then
self.btn_music.selected = false
GameApplication.Instance.MusicMute = false;
else
self.btn_music.selected = true
GameApplication.Instance.MusicMute = true;
end
GameApplication.Instance.MusicValue = value
end)
self.slider_sound.onChanged:Add(function()
GameApplication.Instance.SoundValue = self.slider_sound.value
self.btn_sound.selected = false
GameApplication.Instance.SoundMute = false;
local value = math.floor(self.slider_sound.value)
if value > 0 then
self.btn_sound.selected = false
GameApplication.Instance.SoundMute = false;
else
self.btn_sound.selected = true
GameApplication.Instance.SoundMute = true;
end
GameApplication.Instance.SoundValue = value
end)
self.btn_sound.onClick:Add(function()
self.slider_sound.value = 0
GameApplication.Instance.SoundMute = self.btn_sound.selected;
self.slider_sound.value = 0
GameApplication.Instance.SoundValue = 0
end)
self.btn_music.onClick:Add(function()
self.slider_music.value = 0
GameApplication.Instance.MusicMute = self.btn_music.selected;
end)

View File

@ -12,7 +12,6 @@ local bg_config = {
{ id = 3, url = "base/main_majiang/bg/bg4", thumb = "ui://Main_Majiang/b04" }
}
local M = {}
setmetatable(M, { __index = WitnessView })
M.HuCardImg = HuCardImg
@ -52,6 +51,12 @@ function M:InitView()
self.btn_setting = self._view:GetChild("btn_setting")
self.btn_setting.onClick:Set(handler(self, self.ClickSetting))
self._view_clearingFather = self._view:GetChild('clearing_show')
local config = ExtendManager.GetExtendConfig(room.game_id)
local mode = config:GetGameInfo()
local gamePlay = mode:LoadConfigToDetailOnlyPlay(json.encode(room.room_config.config),
json.encode(room.room_config.config.hpData))
self._view:GetChild('wanfa_text').text = gamePlay
end
function M:ClickSetting()
@ -61,7 +66,7 @@ end
function M:Show()
getmetatable(M).__index.Show(self)
self:PlayMJSound("game_backmusic.mp3")
self:PlayMJMusic("game_backmusic.mp3")
end
local majiang_asset_path = "base/main_majiang/sound/"
@ -79,6 +84,14 @@ function M:PlaySound(group, sex, path)
ViewUtil.PlaySound(group, path1)
end
function M:GetPlayerInfo(playId)
for _, info in pairs(self._player_info) do
if info._player.self_user.account_id == playId then
return info
end
end
end
function M:EventInit()
getmetatable(M).__index.EventInit(self)
local _gamectr = self._gamectr

View File

@ -5,7 +5,7 @@
<image id="n17_nuxq" name="bg" src="xblm7jbk" fileName="images/bg.png" xy="0,0" size="1182,552">
<relation target="" sidePair="width-width,height-height"/>
</image>
<richtext id="n18_xblm" name="tex_message" xy="88,157" size="1005,193" font="Alimama FangYuanTi VF" fontSize="45" color="#614103" align="center" vAlign="middle" ubb="true" autoSize="none" bold="true" text="空间和空间空间和空间空间和空间&#xA;空间和空间空间和空间空间和空间空间和空间空间和空间空间和空间&#xA;空间和空间空间和空间空间和空间"/>
<richtext id="n18_xblm" name="tex_message" xy="87,157" size="1005,193" font="Arial" fontSize="45" color="#614103" align="center" vAlign="middle" ubb="true" autoSize="none" text="空间和空间空间和空间空间和空间&#xA;空间和空间空间和空间空间和空间空间和空间空间和空间空间和空间&#xA;空间和空间空间和空间空间和空间"/>
<component id="n4_m0vo" name="btn_ok" src="eeqmcgp" fileName="buttons/Btn_Common.xml" xy="436,374" size="309,114">
<Button title=" " icon="ui://27vd145bxblm7jbl"/>
</component>

View File

@ -13,7 +13,6 @@
<relation target="n16_id5t" sidePair="bottom-top"/>
<item/>
<item url="ui://2d9xdj6zp8hp7cz4"/>
<item url="ui://2d9xdj6zp8hp7cz8"/>
</list>
<image id="n3_pzuc" name="n3" src="86ct7cwu" fileName="component/CreatePlay/Image/Rectangle 91.png" xy="564,157" size="1914,975"/>
<image id="n18_p8hp" name="n18" src="p8hp7cz5" fileName="component/CreatePlay/Image/Rectangle 292.png" xy="563,945"/>
@ -23,11 +22,14 @@
<list id="n6_pzuc" name="list_playName" xy="60,156" size="472,976" overflow="scroll" lineGap="24" defaultItem="ui://2d9xdj6z86ct7cwy" align="center" selectionController="playName" autoClearItems="true">
<item/>
</list>
<text id="n13_pzuc" name="input_multiple" xy="1539,996" size="120,71" visible="false" font="ui://27vd145bh35o7ill" fontSize="42" color="#ffffff" align="center" vAlign="middle" autoSize="none" singleLine="true" text="1" input="true"/>
<component id="n10_pzuc" name="btn_create" src="pzuc7cx5" fileName="component/CreatePlay/Component/btn_Create.xml" xy="1980,568" group="n15_pzuc"/>
<text id="n11_pzuc" name="n11" xy="1658,606" size="110,72" group="n15_pzuc" font="ui://27vd145bh35o7ill" fontSize="54" color="#450f05" text="倍数"/>
<graph id="n12_pzuc" name="n12" xy="1533,607" size="120,69" group="n15_pzuc" visible="false" type="rect" lineSize="0" fillColor="#ffb8997d"/>
<group id="n15_pzuc" name="buttom" xy="1533,568" size="849,147" visible="false" advanced="true"/>
<image id="n22_n9qr" name="n22" src="l2997iht" fileName="font/images/win/shurukuang5.png" pkg="27vd145b" xy="1667,1002" size="174,78" group="n15_pzuc"/>
<component id="n19_n9qr" name="btn_create" src="eeqmcgp" fileName="buttons/Btn_Common.xml" pkg="27vd145b" xy="2034,968" size="426,144" group="n15_pzuc">
<Button title=" " titleColor="#167547" titleFontSize="24" icon="ui://2d9xdj6zp8hp7cz6"/>
</component>
<component id="n20_n9qr" name="btn_changeTimes" src="n9qr7d9b" fileName="component/CreatePlay/Component/Btn_noImage.xml" xy="1667,1002" size="174,78" group="n15_pzuc"/>
<text id="n23_n9qr" name="tex_times" xy="1667,1002" size="174,78" group="n15_pzuc" font="ui://27vd145bh35o7ilb" fontSize="48" color="#222222" align="center" vAlign="middle" autoSize="shrink" text="1" input="true"/>
<text id="n21_n9qr" name="n21" xy="1506,999" size="169,86" group="n15_pzuc" font="ui://27vd145bh35o7im7" fontSize="66" color="#450f05" vAlign="middle" autoSize="none" text="倍数:"/>
<group id="n15_pzuc" name="Lobby_create" xy="1506,968" size="954,144" visible="false" advanced="true"/>
<list id="n16_id5t" name="list_playPanel" xy="564,158" size="1906,787" overflow="scroll"/>
</displayList>
</component>

View File

@ -1,9 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="1750,800" overflow="scroll" extention="Label">
<displayList>
<image id="n9_xx1c" name="n9" src="xx1c7d8o" fileName="GamePlay/image/jinxiDetaill1.png" xy="0,0"/>
<image id="n10_xx1c" name="n10" src="xx1c7d8p" fileName="GamePlay/image/jinxiDetaill2.png" xy="0,673"/>
<image id="n11_xx1c" name="n11" src="xx1c7d8q" fileName="GamePlay/image/jinxiDetaill3.png" xy="0,1340"/>
<image id="n12_xx1c" name="n12" src="xx1c7d8n" fileName="GamePlay/image/jinxiDetaill4.png" xy="0,2080"/>
<image id="n13_n9qr" name="n13" src="n9qr7d99" fileName="GamePlay/image/jinxiDetaill.png" xy="0,0" scale="1,0.85"/>
</displayList>
</component>

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 KiB

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="100,20" extention="Button">
<controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
<displayList>
<graph id="n0_icoc" name="n0" xy="0,0" size="100,20" alpha="0" touchable="false" type="rect" lineSize="0" lineColor="#ffffffff">
<gearDisplay controller="button" pages="0"/>
<relation target="" sidePair="width-width,height-height"/>
</graph>
<graph id="n1_icoc" name="n1" xy="0,0" size="100,20" alpha="0" touchable="false" type="rect" lineSize="0" lineColor="#ffffffff">
<gearDisplay controller="button" pages="2"/>
<relation target="" sidePair="width-width,height-height"/>
</graph>
<graph id="n2_icoc" name="n2" xy="0,0" size="100,20" alpha="0" touchable="false" type="rect" lineSize="0" lineColor="#ffffffff">
<gearDisplay controller="button" pages="1,3"/>
<relation target="" sidePair="width-width,height-height"/>
</graph>
</displayList>
<Button/>
</component>

View File

@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="78,60" pivot="0.5,0.5" extention="Button">
<controller name="button" pages="0,up,1,down,3,over,4,selectedOver" selected="3"/>
<controller name="button" pages="0,up,1,down,3,over,4,selectedOver" selected="0"/>
<displayList>
<image id="n5_h35o" name="n5" src="h35o7crs" fileName="component/Setting/Image/Vector@3x.png" xy="0,0">
<image id="n5_h35o" name="n5" src="h35o7crs" fileName="component/Setting/Image/Vector@3x.png" xy="0,0" size="78,60">
<gearDisplay controller="button" pages="0,3"/>
<gearSize controller="button" pages="3" values="78,60,1.2,1.2" default="78,60,1,1"/>
<gearSize controller="button" pages="0,3" values="78,60,1,1|78,60,1.2,1.2" default="78,60,1,1"/>
</image>
<image id="n6_h35o" name="n6" src="h35o7crm" fileName="component/Setting/Image/Group 82@3x.png" xy="0,-2" scale="1.2,1.2">
<image id="n6_h35o" name="n6" src="h35o7crm" fileName="component/Setting/Image/Group 82@3x.png" xy="0,-2" size="78,60">
<gearDisplay controller="button" pages="1,4"/>
<gearSize controller="button" pages="4" values="80,62,1.2,1.2" default="80,62,1,1"/>
<gearSize controller="button" pages="0,4" values="78,60,1,1|80,62,1.2,1.2" default="80,62,1,1"/>
</image>
</displayList>
<Button mode="Check"/>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="100,20" extention="Button">
<controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
<displayList>
<graph id="n0_icoc" name="n0" xy="0,0" size="100,20" alpha="0" touchable="false" type="rect" lineSize="0" lineColor="#ffffffff">
<gearDisplay controller="button" pages="0"/>
<relation target="" sidePair="width-width,height-height"/>
</graph>
<graph id="n1_icoc" name="n1" xy="0,0" size="100,20" alpha="0" touchable="false" type="rect" lineSize="0" lineColor="#ffffffff">
<gearDisplay controller="button" pages="2"/>
<relation target="" sidePair="width-width,height-height"/>
</graph>
<graph id="n2_icoc" name="n2" xy="0,0" size="100,20" alpha="0" touchable="false" type="rect" lineSize="0" lineColor="#ffffffff">
<gearDisplay controller="button" pages="1,3"/>
<relation target="" sidePair="width-width,height-height"/>
</graph>
</displayList>
<Button/>
</component>

View File

@ -690,6 +690,9 @@
<image id="xx1c7d96" name="paodekuaiDetail1.png" path="/GamePlay/image/"/>
<image id="xx1c7d97" name="paodekuaiDetail2.png" path="/GamePlay/image/"/>
<component id="xx1c7d98" name="paodekuaiDetail.xml" path="/GamePlay/component/" exported="true"/>
<image id="n9qr7d99" name="jinxiDetaill.png" path="/GamePlay/image/" atlas="alone"/>
<component id="n9qr7d9a" name="Btn_noImage.xml" path="/mgr/"/>
<component id="n9qr7d9b" name="Btn_noImage.xml" path="/component/CreatePlay/Component/"/>
</resources>
<publish name="Lobby" path="..\wb_unity_pro\Assets\ART\base\lobby\ui" packageCount="2">
<atlas name="默认" index="0"/>

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="360,129" extention="Button">
<component size="360,129" pivot="0.5,0.5" extention="Button">
<controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
<displayList>
<image id="n3_pkx5" name="n3" src="xblm1a9" fileName="Main_new/Main/Image/Setting_6.png" xy="0,0" size="360,129">
<relation target="" sidePair="width-width,height-height"/>
</image>
</displayList>
<Button downEffect="dark" downEffectValue="0.8"/>
<Button downEffect="scale" downEffectValue="1.2"/>
</component>

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="960,372" pivot="0.5,0.5" opaque="false">
<displayList>
<loader id="n1_m21r" name="loader_img" xy="144,111" pivot="0.5,0.5" size="671,146" aspect="true" url="ui://v0j9abjywhhc1f7" align="center" vAlign="middle" fill="scale">
<relation target="" sidePair="width-width,center-center,middle-middle"/>
<loader id="n1_m21r" name="loader_img" xy="204,124" pivot="0.5,0.5" size="551,120" aspect="true" url="ui://v0j9abjywhhc1f5" align="center" vAlign="middle" fill="scale">
<relation target="" sidePair="center-center,middle-middle"/>
</loader>
<movieclip id="n2_m21r" name="effect_xingxing" src="xqxr1er" fileName="Main_new/Main/Component/xingxing.jta" xy="240,6" size="480,360" aspect="true">
<movieclip id="n2_m21r" name="effect_xingxing" src="xqxr1er" fileName="Main_new/Main/Component/xingxing.jta" xy="240,4" size="480,360" aspect="true">
<relation target="n1_m21r" sidePair="center-center,middle-middle"/>
</movieclip>
</displayList>

View File

@ -100,12 +100,15 @@
<gearXY controller="3d" pages="0" values="-1945,-1060" default="616,100"/>
</image>
<text id="n66_ogwn" name="Text_CardInfo" xy="-2053,594" size="813,973" visible="false" fontSize="30" autoSize="none" text="{&#xA;&quot;FZ_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Out_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Hand_Card&quot;:&quot;b203_&quot;,&#xA;&quot;Get_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Get_Card&quot;:&quot;100&quot;,&#xA;&quot;Pos_Y&quot;:28,&#xA;&quot;Order&quot;:&quot;desc&quot;,&#xA;&quot;IS_SIDE&quot;:&quot;true&quot;&#xA;}"/>
<list id="n67_jzul" name="list_HuEffect" xy="1572,6" size="960,1170" layout="flow_vt" selectionMode="none" lineItemCount="4" defaultItem="ui://v0j9abjyxqxr1eq" autoItemSize="true" align="center" vAlign="middle" autoClearItems="true">
<list id="n67_jzul" name="list_HuEffect" xy="1572,6" size="960,1170" layout="flow_vt" selectionMode="none" margin="60,0,0,0" lineGap="-171" colGap="-13" lineItemCount="4" defaultItem="ui://v0j9abjyxqxr1eq" align="center" autoClearItems="true">
<item/>
<item/>
<item/>
<item/>
<item/>
</list>
<loader id="n68_jzul" name="loader_selfHuCardEffect" xy="2052,514" pivot="0.5,0.5" anchor="true" size="280,200" align="center" vAlign="middle"/>
<movieclip id="n69_66fw" name="effect_ZiMo" src="whhc1fo" fileName="Main_new/Main/Effect_ZiMo.jta" xy="2052,514" pivot="0.5,0.5" anchor="true" size="530,353" aspect="true" visible="false" playing="false">
<loader id="n68_jzul" name="loader_selfHuCardEffect" xy="2052,513" pivot="0.5,0.5" anchor="true" size="280,200" align="center" vAlign="middle"/>
<movieclip id="n69_66fw" name="effect_ZiMo" src="whhc1fo" fileName="Main_new/Main/Effect_ZiMo.jta" xy="2052,513" pivot="0.5,0.5" anchor="true" size="530,353" aspect="true" visible="false" playing="false">
<relation target="n68_jzul" sidePair="center-center,middle-middle"/>
</movieclip>
<component id="n71_r8cy" name="area_clip_pg" src="gq7m8i" fileName="Main_style_2/Component1.xml" xy="1884,439" pivot="0.5,0.5" size="336,290" touchable="false">

View File

@ -4,7 +4,7 @@
<controller name="ting" pages="0,,1," selected="0"/>
<controller name="site" pages="0,2-1,1,2-2" selected="0"/>
<controller name="getCard" pages="0,,1," selected="0"/>
<controller name="cStie" exported="true" pages="0,,1,,2," selected="2">
<controller name="cStie" exported="true" pages="0,,1,,2," selected="0">
<remark page="0" value="2人"/>
<remark page="1" value="3人"/>
<remark page="2" value="4人"/>
@ -24,7 +24,6 @@
<item/>
<item/>
<item/>
<item/>
</list>
<list id="n38_gi99" name="List_FZ" xy="478,18" size="1329,103" touchable="false" layout="row" selectionMode="none" colGap="7" defaultItem="ui://v0j9abjygi9910r" autoItemSize="false" align="right" vAlign="bottom" autoClearItems="true">
<relation target="" sidePair="width-width%,height-height%,top-top"/>
@ -33,7 +32,7 @@
<item/>
<item/>
</list>
<list id="n41_gi99" name="List_OutCard" xy="833,160" size="887,502" touchable="false" pageController="ting" layout="flow_hz" selectionMode="none" margin="40,0,0,0" lineGap="-20" colGap="-7" defaultItem="ui://v0j9abjywcy51g8" autoItemSize="true" align="right" autoClearItems="true">
<list id="n41_gi99" name="List_OutCard" xy="265,165" size="2097,502" touchable="false" pageController="ting" layout="flow_hz" selectionMode="none" margin="40,0,0,0" lineGap="-20" colGap="-7" defaultItem="ui://v0j9abjywcy51g8" autoItemSize="true" align="right" autoClearItems="true">
<gearXY controller="cStie" pages="0,1,2" values="265,165|324,103|833,160"/>
<gearSize controller="cStie" pages="1,2" values="1217,502,1,1|887,502,1,1" default="2097,502,1,1"/>
<relation target="" sidePair="width-width%,height-height%,top-top"/>
@ -81,8 +80,8 @@
<gearDisplay controller="ting" pages="1"/>
<gearXY controller="3d" pages="0" values="-1732,-1096" default="616,100"/>
</image>
<text id="n53_ogwn" name="Text_CardInfo" xy="-1881,281" size="813,973" visible="false" fontSize="30" autoSize="none" text="{&#xA;&quot;FZ_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Out_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Hand_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Get_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Get_Card&quot;:&quot;100&quot;,&#xA;&quot;Pos_Y&quot;:-28,&#xA;&quot;Order&quot;:&quot;asc&quot;,&#xA;&quot;back_columnGap&quot;:&quot;-9&quot;,&#xA;&quot;show_columnGap&quot;:&quot;-6 &quot;&#xA;}">
<gearText controller="cStie" pages="0,1,2" values="{&#xA;&quot;FZ_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Out_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Hand_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Get_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Get_Card&quot;:&quot;100&quot;,&#xA;&quot;Pos_Y&quot;:-28,&#xA;&quot;Order&quot;:&quot;asc&quot;,&#xA;&quot;back_columnGap&quot;:&quot;-9&quot;,&#xA;&quot;show_columnGap&quot;:&quot;-3&quot;&#xA;}|{&#xA;&quot;FZ_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Out_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Hand_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Get_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Get_Card&quot;:&quot;100&quot;,&#xA;&quot;Pos_Y&quot;:-28,&#xA;&quot;Order&quot;:&quot;asc&quot;,&#xA;&quot;back_columnGap&quot;:&quot;-9&quot;,&#xA;&quot;show_columnGap&quot;:&quot;-3&quot;&#xA;}|{&#xA;&quot;FZ_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Out_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Hand_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Get_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Get_Card&quot;:&quot;100&quot;,&#xA;&quot;Pos_Y&quot;:-28,&#xA;&quot;Order&quot;:&quot;asc&quot;,&#xA;&quot;back_columnGap&quot;:&quot;-9&quot;,&#xA;&quot;show_columnGap&quot;:&quot;-6 &quot;&#xA;}"/>
<text id="n53_ogwn" name="Text_CardInfo" xy="-1881,281" size="813,973" visible="false" fontSize="30" autoSize="none" text="{&#xA;&quot;FZ_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Out_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Hand_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Get_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Get_Card&quot;:&quot;100&quot;,&#xA;&quot;Pos_Y&quot;:-28,&#xA;&quot;Order&quot;:&quot;asc&quot;,&#xA;&quot;back_columnGap&quot;:&quot;-9&quot;,&#xA;&quot;show_columnGap&quot;:&quot;-3&quot;,&#xA;&quot;huEffet_columnGap&quot;:&quot;-666&quot;&#xA;}">
<gearText controller="cStie" pages="0,1,2" values="{&#xA;&quot;FZ_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Out_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Hand_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Get_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Get_Card&quot;:&quot;100&quot;,&#xA;&quot;Pos_Y&quot;:-28,&#xA;&quot;Order&quot;:&quot;asc&quot;,&#xA;&quot;back_columnGap&quot;:&quot;-9&quot;,&#xA;&quot;show_columnGap&quot;:&quot;-3&quot;,&#xA;&quot;huEffet_columnGap&quot;:&quot;-666&quot;&#xA;}|{&#xA;&quot;FZ_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Out_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Hand_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Get_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Get_Card&quot;:&quot;100&quot;,&#xA;&quot;Pos_Y&quot;:-28,&#xA;&quot;Order&quot;:&quot;asc&quot;,&#xA;&quot;back_columnGap&quot;:&quot;-9&quot;,&#xA;&quot;show_columnGap&quot;:&quot;-3&quot;&#xA;}|{&#xA;&quot;FZ_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Out_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Hand_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Get_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Get_Card&quot;:&quot;100&quot;,&#xA;&quot;Pos_Y&quot;:-28,&#xA;&quot;Order&quot;:&quot;asc&quot;,&#xA;&quot;back_columnGap&quot;:&quot;-9&quot;,&#xA;&quot;show_columnGap&quot;:&quot;-6 &quot;&#xA;}"/>
</text>
<list id="n54_jzul" name="list_HuEffect" xy="-1,32" size="2532,420" touchable="false" layout="flow_hz" selectionMode="none" lineItemCount="4" defaultItem="ui://v0j9abjyxqxr1eq" autoItemSize="true" align="center" vAlign="middle" autoClearItems="true">
<item/>

View File

@ -96,9 +96,10 @@
<component id="n61_r8cy" name="area_clip_pg" src="gq7m8i" fileName="Main_style_2/Component1.xml" xy="1098,617" pivot="0.5,0.5" size="336,290" touchable="false">
<relation target="" sidePair="width-width%,height-height%"/>
</component>
<list id="n58_jzul" name="list_HuEffect" xy="0,568" size="2532,420" touchable="false" layout="flow_hz" selectionMode="none" lineItemCount="4" defaultItem="ui://v0j9abjyxqxr1eq" autoItemSize="true" align="center" vAlign="middle" autoClearItems="true">
<list id="n58_jzul" name="list_HuEffect" xy="0,568" size="2532,420" touchable="false" layout="flow_hz" selectionMode="none" lineGap="7" lineItemCount="4" defaultItem="ui://v0j9abjyxqxr1eq" autoItemSize="true" align="center" vAlign="middle" autoClearItems="true">
<relation target="" sidePair="width-width,height-height,bottom-bottom"/>
<item/>
<item/>
</list>
<component id="n51_ogwn" name="area_fz_list" src="gq7m8i" fileName="Main_style_2/Component1.xml" xy="-2533,-1563" size="11,249"/>
<component id="n53_ogwn" name="mask_liangpai" src="gq7m8i" fileName="Main_style_2/Component1.xml" xy="-2143,-1300" size="1,1"/>
@ -107,7 +108,7 @@
<gearDisplay controller="ting" pages="1"/>
<gearXY controller="3d" pages="0" values="-2193,-1423" default="616,100"/>
</image>
<text id="n57_ogwn" name="Text_CardInfo" xy="-2587,110" size="813,973" visible="false" fontSize="30" autoSize="none" text="{&#xA;&quot;FZ_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Out_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Hand_Card&quot;:&quot;b201_&quot;,&#xA;&quot;Get_Card&quot;:&quot;b201_&quot;,&#xA;&quot;Order&quot;:&quot;desc&quot;,&#xA;&quot;Pos_X&quot;:57&#xA;}"/>
<text id="n57_ogwn" name="Text_CardInfo" xy="-2587,106" size="813,973" visible="false" fontSize="30" autoSize="none" text="{&#xA;&quot;FZ_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Out_Card&quot;:&quot;b202_&quot;,&#xA;&quot;Hand_Card&quot;:&quot;b201_&quot;,&#xA;&quot;Get_Card&quot;:&quot;b201_&quot;,&#xA;&quot;Order&quot;:&quot;desc&quot;,&#xA;&quot;Pos_X&quot;:57,&#xA;&quot;huEffet_columnGap&quot;:&quot;-666&quot;&#xA;}"/>
<component id="n39_nee3" name="Comp_FZTips" src="nee311b" fileName="Main_new/FZTips/Comp_FZTips.xml" xy="184,657">
<gearDisplay controller="tip" pages="1"/>
<relation target="" sidePair="bottom-bottom"/>

View File

@ -87,7 +87,9 @@
<movieclip id="n68_66fw" name="effect_ZiMo" src="whhc1fo" fileName="Main_new/Main/Effect_ZiMo.jta" xy="511,503" pivot="0.5,0.5" anchor="true" size="530,353" aspect="true" visible="false" playing="false">
<relation target="n67_jzul" sidePair="center-center,middle-middle"/>
</movieclip>
<list id="n66_jzul" name="list_HuEffect" xy="31,-2" size="960,1170" layout="flow_vt" selectionMode="none" lineItemCount="4" defaultItem="ui://v0j9abjyxqxr1eq" autoItemSize="true" align="center" vAlign="middle" autoClearItems="true">
<list id="n66_jzul" name="list_HuEffect" xy="31,-2" size="960,1170" layout="flow_vt" selectionMode="none" margin="60,0,0,0" lineGap="-171" lineItemCount="4" defaultItem="ui://v0j9abjyxqxr1eq" align="center" autoClearItems="true">
<item/>
<item/>
<item/>
<item/>
</list>

View File

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="100,83">
<controller name="jing" pages="0,,1," selected="0"/>
<controller name="jing" pages="0,,1," selected="1"/>
<displayList>
<loader id="n0_gi99" name="icon" xy="0,0" pivot="0.5,0.5" size="100,83" skew="180,180" url="ui://v0j9abjylj2n18d" fill="scaleFree">
<relation target="" sidePair="width-width,height-height"/>
</loader>
<image id="n1_l02z" name="jing" src="ofwa1gm" fileName="Main_new/Main/Image/jing.png" xy="52,-2" size="43,63" aspect="true" flip="vt">
<image id="n1_l02z" name="jing" src="ofwa1gm" fileName="Main_new/Main/Image/jing.png" xy="52,25" size="43,63" aspect="true" flip="vt">
<gearDisplay controller="jing" pages="1"/>
<relation target="" sidePair="width-width,height-height"/>
</image>

View File

@ -32,7 +32,7 @@
</component>
<component id="n31_xblm" name="btn_vedio_music" src="xblm1ak" fileName="component/Setting/Component/btn_vedio.xml" xy="1198,544" group="n32_xblm"/>
<group id="n32_xblm" name="music" xy="205,531" size="1071,94"/>
<component id="n16_qt01" name="btn_closeRoom" src="pkx5sv" fileName="Main_new/Main/Component/btn_closeRoom.xml" xy="514,674" size="409,160">
<component id="n16_qt01" name="btn_closeRoom" src="pkx5sv" fileName="Main_new/Main/Component/btn_closeRoom.xml" xy="514,673" size="409,160">
<gearDisplay controller="cBtn" pages="0"/>
<relation target="" sidePair="center-center"/>
</component>

View File

@ -1,10 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="78,60" extention="Button">
<controller name="button" pages="0,up,1,down" selected="0"/>
<controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="3"/>
<displayList>
<image id="n5_h35o" name="n5" src="xblm1al" fileName="component/Setting/Image/Vector@3x.png" xy="0,0"/>
<image id="n6_h35o" name="n6" src="xblm1am" fileName="component/Setting/Image/Group 82@3x.png" xy="0,-2">
<gearDisplay controller="button" pages="1"/>
<image id="n5_h35o" name="n5" src="xblm1al" fileName="component/Setting/Image/Vector@3x.png" xy="0,0" pivot="0.5,0.5" size="78,60">
<gearDisplay controller="button" pages="0,2"/>
<gearSize controller="button" pages="2" values="78,60,1.2,1.2" default="78,60,1,1"/>
</image>
<image id="n6_h35o" name="n6" src="xblm1am" fileName="component/Setting/Image/Group 82@3x.png" xy="0,-2" pivot="0.5,0.5" size="78,60" scale="1.2,1.2">
<gearDisplay controller="button" pages="1,3"/>
<gearSize controller="button" pages="3" values="78,60,1.2,1.2" default="78,60,1,1"/>
</image>
</displayList>
<Button mode="Check"/>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

After

Width:  |  Height:  |  Size: 3.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 MiB

After

Width:  |  Height:  |  Size: 3.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 813 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 626 KiB

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

View File

@ -1,92 +0,0 @@
fileFormatVersion: 2
guid: 8a71b2d845e5a5a4ab9165c3f6d80211
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: base/lobby/4a425335ab0e1c246f741e6da62b244f
assetBundleVariant:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 MiB

After

Width:  |  Height:  |  Size: 3.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 928 KiB

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 728 KiB

After

Width:  |  Height:  |  Size: 729 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 KiB

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 8adbc7c19a2a16849944471527497794
guid: b9f3988153af3d342a1f641c66b8cc05
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName: base/lobby/4a425335ab0e1c246f741e6da62b244f
assetBundleName:
assetBundleVariant:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 MiB

After

Width:  |  Height:  |  Size: 4.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 MiB

After

Width:  |  Height:  |  Size: 3.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 KiB

After

Width:  |  Height:  |  Size: 155 KiB

View File

@ -615,7 +615,15 @@ namespace LuaInterface
public int LuaUpdate(float delta, float unscaled)
{
return LuaDLL.tolua_update(L, delta, unscaled);
try
{
return LuaDLL.tolua_update(L, delta, unscaled);
}
catch (Exception e)
{
Debug.LogError($"[Lua C# Exception] {e}\n{e.StackTrace}");
throw; //(可选,让 Lua pcall 接到错误)
}
}
public int LuaLateUpdate()

View File

@ -8,34 +8,34 @@
"bundle": "extend/poker/runfast"
},
{
"ver": "1.0.46",
"ver": "1.0.47",
"name": "南城麻将",
"check": true,
"version": "1.0.46",
"version": "1.0.47",
"game_id": "86",
"bundle": "extend/majiang/nancheng"
},
{
"ver": "1.0.49",
"ver": "1.0.50",
"name": "黎川麻将",
"check": true,
"version": "1.0.49",
"version": "1.0.50",
"game_id": "87",
"bundle": "extend/majiang/lichuan"
},
{
"ver": "1.0.33",
"ver": "1.0.34",
"name": "金溪麻将",
"check": true,
"version": "1.0.33",
"version": "1.0.34",
"game_id": "88",
"bundle": "extend/majiang/jinxi"
},
{
"ver": "1.0.32",
"ver": "1.0.33",
"name": "抚州麻将",
"check": true,
"version": "1.0.32",
"version": "1.0.33",
"game_id": "89",
"bundle": "extend/majiang/fuzhou"
}

View File

@ -1,109 +1,109 @@
[
{
"lua_path": "/tolua_project,/base_project,/main_project",
"ver": "1.0.6",
"ver": "1.0.7",
"name": "base_script",
"check": true,
"bundle": "base/base_script",
"version": "1.0.6"
"version": "1.0.7"
},
{
"ver": "1.0.6",
"ver": "1.0.7",
"name": "common",
"check": true,
"bundle": "base/common",
"version": "1.0.6"
"version": "1.0.7"
},
{
"ver": "1.0.6",
"ver": "1.0.7",
"name": "login",
"check": true,
"bundle": "base/login",
"version": "1.0.6"
"version": "1.0.7"
},
{
"ver": "1.0.6",
"ver": "1.0.7",
"name": "lobby",
"check": true,
"bundle": "base/lobby",
"version": "1.0.6"
"version": "1.0.7"
},
{
"ver": "1.0.6",
"ver": "1.0.7",
"name": "Family",
"check": true,
"bundle": "base/Family",
"version": "1.0.6"
"version": "1.0.7"
},
{
"ver": "1.0.6",
"ver": "1.0.7",
"name": "chat",
"check": true,
"bundle": "base/chat",
"version": "1.0.6"
"version": "1.0.7"
},
{
"ver": "1.0.6",
"ver": "1.0.7",
"name": "newgroup",
"check": true,
"bundle": "base/newgroup",
"version": "1.0.6"
"version": "1.0.7"
},
{
"ver": "1.0.6",
"ver": "1.0.7",
"name": "rank",
"check": true,
"version": "1.0.6",
"version": "1.0.7",
"bundle": "base/rank"
},
{
"ver": "1.0.6",
"ver": "1.0.7",
"name": "main_majiang",
"check": true,
"version": "1.0.6",
"version": "1.0.7",
"bundle": "base/main_majiang"
},
{
"ver": "1.0.6",
"ver": "1.0.7",
"name": "main_poker",
"check": true,
"version": "1.0.6",
"version": "1.0.7",
"bundle": "base/main_poker"
},
{
"ver": "1.0.6",
"ver": "1.0.7",
"name": "main_zipai",
"check": true,
"version": "1.0.6",
"version": "1.0.7",
"bundle": "base/main_zipai"
},
{
"ver": "1.0.6",
"ver": "1.0.7",
"name": "static",
"check": true,
"bundle": "base/static",
"version": "1.0.6"
"version": "1.0.7"
},
{
"ver": "1.0.6",
"ver": "1.0.7",
"is_res": true,
"name": "embed",
"check": true,
"bundle": "base/embed",
"version": "1.0.6"
"version": "1.0.7"
},
{
"ver": "1.0.6",
"ver": "1.0.7",
"name": "main_pokemajiang",
"check": true,
"version": "1.0.6",
"version": "1.0.7",
"bundle": "base/main_pokemajiang"
},
{
"ver": "1.0.6",
"ver": "1.0.7",
"name": "main_zipaimajiang",
"check": true,
"version": "1.0.6",
"version": "1.0.7",
"bundle": "base/main_zipaimajiang"
}
]

Some files were not shown because too many files have changed in this diff Show More