setHome放到web连接
parent
c0e4f8ce94
commit
6feed6a28e
|
|
@ -662,20 +662,6 @@ function M:OnEvtMISSILE(msg)
|
|||
DispatchEvent(self._dispatcher, GameEvent.MISSILE, nil, msg)
|
||||
end
|
||||
|
||||
-- 按home建 out在程序外 enter在程序内
|
||||
function M:FG_Set_Home(gameStatus)
|
||||
local _client = ControllerManager.GameNetClinet
|
||||
if not _client then
|
||||
return
|
||||
end
|
||||
local _data = {}
|
||||
_data.uid = DataManager.SelfUser.account_id
|
||||
_data.gameStatus = gameStatus
|
||||
_client:send(Protocol.GAME_SET_HOME, _data, function(res)
|
||||
callback(res)
|
||||
end)
|
||||
end
|
||||
|
||||
function M:DispatchEventTuoGuan(p, isShow, t)
|
||||
DispatchEvent(self._dispatcher, GameEvent.TupGuanOpen, p, isShow, t)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -440,6 +440,16 @@ function M:FG_Update_Assistant(groupId, tagId, callback)
|
|||
end)
|
||||
end
|
||||
|
||||
-- 按home建 out在程序外 enter在程序内
|
||||
function M:FG_Set_Home(gameStatus)
|
||||
local _data = {}
|
||||
_data.uid = DataManager.SelfUser.account_id
|
||||
_data.gameStatus = gameStatus
|
||||
self._mgr_client:send(Protocol.GAME_SET_HOME, _data, function(res)
|
||||
callback(res)
|
||||
end)
|
||||
end
|
||||
|
||||
function M:OnEVT_Push_Assistant(evt_data)
|
||||
print("收到助理刷新推送")
|
||||
pt(evt_data)
|
||||
|
|
|
|||
|
|
@ -63,16 +63,10 @@ function FamilyAuditNumber:Show(group)
|
|||
end
|
||||
end)
|
||||
|
||||
local mgr_ctr = ControllerManager.GetController(GroupMgrController)
|
||||
mgr_ctr:AddEventListener(GroupMgrEvent.OnNewApply, handler(self, self.OnNewApply))
|
||||
|
||||
BaseView.Show(self)
|
||||
end
|
||||
|
||||
function FamilyAuditNumber:Close()
|
||||
local mgr_ctr = ControllerManager.GetController(GroupMgrController)
|
||||
mgr_ctr:RemoveEventListener(GroupMgrEvent.OnNewApply, handler(self, self.OnNewApply))
|
||||
|
||||
BaseView.Close(self)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -301,9 +301,9 @@ function OnApplicationPause()
|
|||
-- ViewUtil.CloseModalWait()
|
||||
ViewManager.OnApplicationPause()
|
||||
|
||||
local _gamectr = ControllerManager.GetController(GameController)
|
||||
if _gamectr then
|
||||
_gamectr:FG_Set_Home("out")
|
||||
local gMgr = ControllerManager.GetController(GroupMgrController)
|
||||
if gMgr then
|
||||
gMgr:FG_Set_Home("out")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -311,9 +311,9 @@ end
|
|||
function OnApplicationActive()
|
||||
ViewManager.OnApplicationActive()
|
||||
|
||||
local _gamectr = ControllerManager.GetController(GameController)
|
||||
if _gamectr then
|
||||
_gamectr:FG_Set_Home("enter")
|
||||
local gMgr = ControllerManager.GetController(GroupMgrController)
|
||||
if gMgr then
|
||||
gMgr:FG_Set_Home("enter")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue