退出房间
parent
53c2085bfc
commit
9fc9ba2315
|
|
@ -200,7 +200,15 @@ function M:_evtOnPush_assistant(...)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
view:ChangeOther(tonumber(view._group.lev) + 1)
|
local arg = {...}
|
||||||
|
local groupId = arg[1].id
|
||||||
|
local lev = arg[1].lev
|
||||||
|
|
||||||
|
if groupId ~= view._group.id then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
view:ChangeOther(lev + 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ function M:init(url)
|
||||||
BaseView.InitView(self, url)
|
BaseView.InitView(self, url)
|
||||||
self._full_offset = false
|
self._full_offset = false
|
||||||
local view = self._view
|
local view = self._view
|
||||||
self.lastTime = 0
|
self.lastTime = os.time()
|
||||||
|
|
||||||
self.com_FamilyChatRoom = FamilyChatRoom:Init(view:GetChild('com_chatRoom'), self)
|
self.com_FamilyChatRoom = FamilyChatRoom:Init(view:GetChild('com_chatRoom'), self)
|
||||||
|
|
||||||
|
|
@ -469,7 +469,7 @@ function M:UpdateFamilyRoom(fgCtr, id)
|
||||||
local config = ExtendManager.GetExtendConfig(playList[newIndex].gameId)
|
local config = ExtendManager.GetExtendConfig(playList[newIndex].gameId)
|
||||||
local mode = config:GetGameInfo()
|
local mode = config:GetGameInfo()
|
||||||
-- times倍数
|
-- times倍数
|
||||||
local times = json.decode(playList[newIndex].hpData).times
|
local times = json.decode(playList[newIndex].hpData).times
|
||||||
local gamePlay = times / 1000 .. "倍,"
|
local gamePlay = times / 1000 .. "倍,"
|
||||||
gamePlay = gamePlay .. mode:LoadConfigToDetail(playList[newIndex].config)
|
gamePlay = gamePlay .. mode:LoadConfigToDetail(playList[newIndex].config)
|
||||||
obj:GetChild('Label_gameRule').title = gamePlay
|
obj:GetChild('Label_gameRule').title = gamePlay
|
||||||
|
|
@ -690,6 +690,11 @@ function M:OnUpdate()
|
||||||
end)
|
end)
|
||||||
]]
|
]]
|
||||||
self.lastTime = newTime
|
self.lastTime = newTime
|
||||||
|
--self._view:GetChild('list_familyNumber').numItems = 0
|
||||||
|
|
||||||
|
if self._view:GetChild('list_familyNumber').itemRenderer then
|
||||||
|
self._view:GetChild('list_familyNumber').numItems = #self._group.members
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,27 @@ local EXSettingView = {}
|
||||||
local M = EXSettingView
|
local M = EXSettingView
|
||||||
setmetatable(M, { __index = BaseWindow })
|
setmetatable(M, { __index = BaseWindow })
|
||||||
|
|
||||||
function EXSettingView.new(main_view)
|
function EXSettingView:Show(room)
|
||||||
|
self._room = room
|
||||||
|
|
||||||
|
-- 房主,第一个进房间的人
|
||||||
|
local roomOwner = self._room.player_list[1].self_user.account_id
|
||||||
|
|
||||||
|
if roomOwner == DataManager.SelfUser.account_id then
|
||||||
|
self.cBtn.selectedIndex = 1
|
||||||
|
else
|
||||||
|
self.cBtn.selectedIndex = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
BaseWindow.Show(self)
|
||||||
|
end
|
||||||
|
|
||||||
|
function EXSettingView.new(main_view, flag_witness)
|
||||||
local self = setmetatable({}, { __index = M })
|
local self = setmetatable({}, { __index = M })
|
||||||
self.class = 'EXSettingView'
|
self.class = 'EXSettingView'
|
||||||
self._close_destroy = true
|
self._close_destroy = true
|
||||||
self._mainView = main_view
|
self._mainView = main_view
|
||||||
|
self._flag_witness = flag_witness
|
||||||
self:init('ui://Main_Majiang/Setting')
|
self:init('ui://Main_Majiang/Setting')
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
@ -23,6 +39,8 @@ function M:init(url)
|
||||||
local btn_music = view:GetChild('btn_vedio_music')
|
local btn_music = view:GetChild('btn_vedio_music')
|
||||||
local btn_sound = view:GetChild('btn_vedio_sound')
|
local btn_sound = view:GetChild('btn_vedio_sound')
|
||||||
|
|
||||||
|
self.cBtn = self._view:GetController('cBtn')
|
||||||
|
|
||||||
-- slider_sound.value = GameApplication.Instance.SoundValue
|
-- slider_sound.value = GameApplication.Instance.SoundValue
|
||||||
-- slider_music.value = GameApplication.Instance.MusicValue
|
-- slider_music.value = GameApplication.Instance.MusicValue
|
||||||
|
|
||||||
|
|
@ -46,15 +64,35 @@ function M:init(url)
|
||||||
-- GameApplication.Instance.MusicMute = btn_music.selected;
|
-- GameApplication.Instance.MusicMute = btn_music.selected;
|
||||||
end)
|
end)
|
||||||
|
|
||||||
local _btn_logout = self._view:GetChild('btn_closeRoom')
|
local _btn_logout = self._view:GetChild('btn_cancelRoom')
|
||||||
_btn_logout.onClick:Set(function()
|
_btn_logout.onClick:Set(function()
|
||||||
if self._mainView.dismiss_room_cd_time > 0 then
|
if self._flag_witness then
|
||||||
ViewUtil.ErrorTip(nil, "您还处于解散冷却时间当中,请稍后重试!")
|
local _room = DataManager.CurrenRoom
|
||||||
|
pt(_room)
|
||||||
|
self._mainView._gamectr:ExitWitnessGame(_room.play_id, _room.game_id,
|
||||||
|
_room.room_id)
|
||||||
|
ViewManager.ChangeView(ViewManager.View_Family)
|
||||||
else
|
else
|
||||||
local _gamectr = ControllerManager.GetController(GameController)
|
if self._mainView.dismiss_room_cd_time > 0 then
|
||||||
_gamectr:AskDismissRoom()
|
ViewUtil.ErrorTip(nil, "您还处于解散冷却时间当中,请稍后重试!")
|
||||||
|
else
|
||||||
|
local _gamectr = ControllerManager.GetController(GameController)
|
||||||
|
_gamectr:AskDismissRoom()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
self._view:GetChild("btn_closeRoom").onClick:Set(function()
|
||||||
|
local _gamectr = ControllerManager.GetController(GameController)
|
||||||
|
_gamectr:LevelRoom(function(res)
|
||||||
|
print("退出房间")
|
||||||
|
if res.ReturnCode ~= 0 then
|
||||||
|
ViewUtil.ErrorTip(res.ReturnCode)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
ViewManager.ChangeView(ViewManager.View_Family)
|
||||||
|
end)
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,27 @@ local EXSettingView = {}
|
||||||
local M = EXSettingView
|
local M = EXSettingView
|
||||||
setmetatable(M, { __index = BaseWindow })
|
setmetatable(M, { __index = BaseWindow })
|
||||||
|
|
||||||
function EXSettingView.new(main_view)
|
function EXSettingView:Show(room)
|
||||||
|
self._room = room
|
||||||
|
|
||||||
|
-- 房主,第一个进房间的人
|
||||||
|
local roomOwner = self._room.player_list[1].self_user.account_id
|
||||||
|
|
||||||
|
if roomOwner == DataManager.SelfUser.account_id then
|
||||||
|
self.cBtn.selectedIndex = 1
|
||||||
|
else
|
||||||
|
self.cBtn.selectedIndex = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
BaseWindow.Show(self)
|
||||||
|
end
|
||||||
|
|
||||||
|
function EXSettingView.new(main_view, flag_witness)
|
||||||
local self = setmetatable({}, { __index = M })
|
local self = setmetatable({}, { __index = M })
|
||||||
self.class = 'EXSettingView'
|
self.class = 'EXSettingView'
|
||||||
self._close_destroy = true
|
self._close_destroy = true
|
||||||
self._mainView = main_view
|
self._mainView = main_view
|
||||||
|
self._flag_witness = flag_witness
|
||||||
self:init('ui://Main_Majiang/Setting')
|
self:init('ui://Main_Majiang/Setting')
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
@ -23,6 +39,8 @@ function M:init(url)
|
||||||
local btn_music = view:GetChild('btn_vedio_music')
|
local btn_music = view:GetChild('btn_vedio_music')
|
||||||
local btn_sound = view:GetChild('btn_vedio_sound')
|
local btn_sound = view:GetChild('btn_vedio_sound')
|
||||||
|
|
||||||
|
self.cBtn = self._view:GetController('cBtn')
|
||||||
|
|
||||||
-- slider_sound.value = GameApplication.Instance.SoundValue
|
-- slider_sound.value = GameApplication.Instance.SoundValue
|
||||||
-- slider_music.value = GameApplication.Instance.MusicValue
|
-- slider_music.value = GameApplication.Instance.MusicValue
|
||||||
|
|
||||||
|
|
@ -46,15 +64,35 @@ function M:init(url)
|
||||||
-- GameApplication.Instance.MusicMute = btn_music.selected;
|
-- GameApplication.Instance.MusicMute = btn_music.selected;
|
||||||
end)
|
end)
|
||||||
|
|
||||||
local _btn_logout = self._view:GetChild('btn_closeRoom')
|
local _btn_logout = self._view:GetChild('btn_cancelRoom')
|
||||||
_btn_logout.onClick:Set(function()
|
_btn_logout.onClick:Set(function()
|
||||||
if self._mainView.dismiss_room_cd_time > 0 then
|
if self._flag_witness then
|
||||||
ViewUtil.ErrorTip(nil, "您还处于解散冷却时间当中,请稍后重试!")
|
local _room = DataManager.CurrenRoom
|
||||||
|
pt(_room)
|
||||||
|
self._mainView._gamectr:ExitWitnessGame(_room.play_id, _room.game_id,
|
||||||
|
_room.room_id)
|
||||||
|
ViewManager.ChangeView(ViewManager.View_Family)
|
||||||
else
|
else
|
||||||
local _gamectr = ControllerManager.GetController(GameController)
|
if self._mainView.dismiss_room_cd_time > 0 then
|
||||||
_gamectr:AskDismissRoom()
|
ViewUtil.ErrorTip(nil, "您还处于解散冷却时间当中,请稍后重试!")
|
||||||
|
else
|
||||||
|
local _gamectr = ControllerManager.GetController(GameController)
|
||||||
|
_gamectr:AskDismissRoom()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
self._view:GetChild("btn_closeRoom").onClick:Set(function()
|
||||||
|
local _gamectr = ControllerManager.GetController(GameController)
|
||||||
|
_gamectr:LevelRoom(function(res)
|
||||||
|
print("退出房间")
|
||||||
|
if res.ReturnCode ~= 0 then
|
||||||
|
ViewUtil.ErrorTip(res.ReturnCode)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
ViewManager.ChangeView(ViewManager.View_Family)
|
||||||
|
end)
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
<controller name="moreBtn" pages="0,,1," selected="0"/>
|
<controller name="moreBtn" pages="0,,1," selected="0"/>
|
||||||
<controller name="familyBan" pages="0,,1," selected="0"/>
|
<controller name="familyBan" pages="0,,1," selected="0"/>
|
||||||
<controller name="cMyfamilyList" pages="0,,1," selected="0"/>
|
<controller name="cMyfamilyList" pages="0,,1," selected="0"/>
|
||||||
<controller name="cIsChatRoom" pages="0,,1," selected="0">
|
<controller name="cIsChatRoom" pages="0,,1," selected="1">
|
||||||
<remark page="0" value="关闭聊天室"/>
|
<remark page="0" value="关闭聊天室"/>
|
||||||
<remark page="1" value="打开聊天室"/>
|
<remark page="1" value="打开聊天室"/>
|
||||||
</controller>
|
</controller>
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
<relation target="" sidePair="right-left,top-top,rightext-right"/>
|
<relation target="" sidePair="right-left,top-top,rightext-right"/>
|
||||||
</image>
|
</image>
|
||||||
<component id="n3_in3i" name="btn_close" src="in3i7cu9" fileName="Main/Component/btn_close.xml" xy="54,6" group="n17_in3i"/>
|
<component id="n3_in3i" name="btn_close" src="in3i7cu9" fileName="Main/Component/btn_close.xml" xy="54,6" group="n17_in3i"/>
|
||||||
|
<text id="n399_nq5b" name="n399" xy="199,26" size="203,97" group="n17_in3i" fontSize="30" align="center" autoSize="none" text="版本1.0.8"/>
|
||||||
<image id="n392_f1fu" name="n392" src="yk1o7d3p" fileName="Main/Image/hall_club_common_tittle_icon1.png" xy="967,24" group="n395_f1fu">
|
<image id="n392_f1fu" name="n392" src="yk1o7d3p" fileName="Main/Image/hall_club_common_tittle_icon1.png" xy="967,24" group="n395_f1fu">
|
||||||
<relation target="n393_f1fu" sidePair="left-left"/>
|
<relation target="n393_f1fu" sidePair="left-left"/>
|
||||||
</image>
|
</image>
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -88,5 +88,5 @@ TextureImporter:
|
||||||
pSDRemoveMatte: 0
|
pSDRemoveMatte: 0
|
||||||
pSDShowRemoveMatteOption: 0
|
pSDShowRemoveMatteOption: 0
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName: base/common/af187115a4824290240734622129b80b
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
|
|
|
||||||
|
|
@ -88,5 +88,5 @@ TextureImporter:
|
||||||
pSDRemoveMatte: 0
|
pSDRemoveMatte: 0
|
||||||
pSDShowRemoveMatteOption: 0
|
pSDShowRemoveMatteOption: 0
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName: base/common/af187115a4824290240734622129b80b
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
|
|
|
||||||
|
|
@ -88,5 +88,5 @@ TextureImporter:
|
||||||
pSDRemoveMatte: 0
|
pSDRemoveMatte: 0
|
||||||
pSDShowRemoveMatteOption: 0
|
pSDShowRemoveMatteOption: 0
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName: base/main_majiang/d2fa434d27dc07bf09395dc32491060b
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"ver": "1.0.29",
|
"ver": "1.0.21",
|
||||||
"name": "跑得快",
|
"name": "跑得快",
|
||||||
"check": true,
|
"check": true,
|
||||||
"version": "1.0.29",
|
"version": "1.0.21",
|
||||||
"game_id": "66",
|
"game_id": "66",
|
||||||
"bundle": "extend/poker/runfast"
|
"bundle": "extend/poker/runfast"
|
||||||
},
|
},
|
||||||
|
|
@ -24,34 +24,34 @@
|
||||||
"bundle": "extend/poker2/suoha"
|
"bundle": "extend/poker2/suoha"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ver": "1.0.21",
|
"ver": "1.0.22",
|
||||||
"name": "南城麻将",
|
"name": "南城麻将",
|
||||||
"check": true,
|
"check": true,
|
||||||
"version": "1.0.21",
|
"version": "1.0.22",
|
||||||
"game_id": "86",
|
"game_id": "86",
|
||||||
"bundle": "extend/majiang/nancheng"
|
"bundle": "extend/majiang/nancheng"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ver": "1.0.22",
|
"ver": "1.0.23",
|
||||||
"name": "黎川麻将",
|
"name": "黎川麻将",
|
||||||
"check": true,
|
"check": true,
|
||||||
"version": "1.0.22",
|
"version": "1.0.23",
|
||||||
"game_id": "87",
|
"game_id": "87",
|
||||||
"bundle": "extend/majiang/lichuan"
|
"bundle": "extend/majiang/lichuan"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ver": "1.0.17",
|
"ver": "1.0.18",
|
||||||
"name": "金溪麻将",
|
"name": "金溪麻将",
|
||||||
"check": true,
|
"check": true,
|
||||||
"version": "1.0.17",
|
"version": "1.0.18",
|
||||||
"game_id": "88",
|
"game_id": "88",
|
||||||
"bundle": "extend/majiang/jinxi"
|
"bundle": "extend/majiang/jinxi"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ver": "1.0.16",
|
"ver": "1.0.17",
|
||||||
"name": "抚州麻将",
|
"name": "抚州麻将",
|
||||||
"check": true,
|
"check": true,
|
||||||
"version": "1.0.16",
|
"version": "1.0.17",
|
||||||
"game_id": "89",
|
"game_id": "89",
|
||||||
"bundle": "extend/majiang/fuzhou"
|
"bundle": "extend/majiang/fuzhou"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -179,7 +179,7 @@ PlayerSettings:
|
||||||
iPhone: 1
|
iPhone: 1
|
||||||
AndroidBundleVersionCode: 12
|
AndroidBundleVersionCode: 12
|
||||||
AndroidMinSdkVersion: 26
|
AndroidMinSdkVersion: 26
|
||||||
AndroidTargetSdkVersion: 30
|
AndroidTargetSdkVersion: 26
|
||||||
AndroidPreferredInstallLocation: 1
|
AndroidPreferredInstallLocation: 1
|
||||||
aotOptions:
|
aotOptions:
|
||||||
stripEngineCode: 0
|
stripEngineCode: 0
|
||||||
|
|
@ -787,7 +787,7 @@ PlayerSettings:
|
||||||
platformArchitecture:
|
platformArchitecture:
|
||||||
iPhone: 1
|
iPhone: 1
|
||||||
scriptingBackend:
|
scriptingBackend:
|
||||||
Android: 1
|
Android: 0
|
||||||
Standalone: 1
|
Standalone: 1
|
||||||
iPhone: 1
|
iPhone: 1
|
||||||
il2cppCompilerConfiguration: {}
|
il2cppCompilerConfiguration: {}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue