local ZPDef = ZPFramework.ZPImport("zp_base.luaScript.ZPDef") local ZPMessage = ZPFramework.ZPImport("zp_base.luaScript.Protocol.ZPMessage") local ZPFunctions = require("zp_xichong.luaScript.xichongFunctions") local ZPRoomToolView = ZPFramework.ZPFrameworkClassImprot("zp_base.luaScript.Views.Room.ZPRoomToolView") local xichongRoomToolView = class("xichongRoomToolView", ZPRoomToolView) function xichongRoomToolView:ctor( ... ) xichongRoomToolView.super.ctor(self) end function xichongRoomToolView:onEnter() xichongRoomToolView.super.onEnter(self) --self:showFastStart(false) self:initVoiceComponent() self:initTuoGuan() end function xichongRoomToolView:loadUi() local ui = loadUI("zp_xichong/res/ui/ui_fangjian/xichong_ui_Tool.ui") self.ui = ui; self:addChild(ui); end function xichongRoomToolView:showFastStart(is) local roomInfo = app.room.roomInfo local curCount = roomInfo.nGameStartCount or 0 if curCount > 0 or (roomInfo.nStatus and roomInfo.nStatus>=ZPDef.ReconnectState.GAME_STATUS_WAIT_OUT_CARDS and roomInfo.nStatus<=ZPDef.ReconnectState.GAME_STATUS_GAME_OVER) then self.ui.Items.Button_EarlyStart:setVisible(false) else local gameInfo=json.decode(roomInfo.strGameInfo) local playnum = gameInfo.playnum or 0 if playnum == -1 then playnum = 4 end local isShowEarlyStart = table.nums(app.room.roomInfo.memberList) < playnum and table.nums(app.room.roomInfo.memberList) > 2 if true == is and isShowEarlyStart and curCount<=0 then --local playerCount = app.room:getPlayerCount() self.ui.Items.Button_EarlyStart:setVisible(true) else self.ui.Items.Button_EarlyStart:setVisible(false) end if gameInfo.startMode and gameInfo.startMode == 0 then--不是快速组局 self.ui.Items.Button_EarlyStart:setVisible(false) end end end --[[function xichongRoomToolView:onClickFastStart( sender )--发起申请 playBtnEffect() local request = ZPMessage.FastStartRequest:new() request.tp = 1 self.ui:sendMsg(app.room, ZPDef.MJEvent.RequestFastsStart, request) end function xichongRoomToolView:showFastStart(is) local roomInfo = app.room.roomInfo if roomInfo.nStatus and roomInfo.nStatus>=ZPDef.GameStatus.GAME_STATUS_WAIT_BANKER_START and roomInfo.nStatus<=ZPDef.GameStatus.GAME_STATUS_GAME_OVER then self.ui.Items.Button_fastStart:setVisible(false) else local playerCount = app.room:getPlayerCount() local roomInfo=app.room.roomInfo local gameInfo=json.decode(roomInfo.strGameInfo) if true == is and playerCount