好友切磋添加结果显示
parent
745150e59a
commit
abd9e6b65a
|
@ -5,16 +5,15 @@ local this = PlayWithSBFormation
|
||||||
--- 是否需要切换编队的功能
|
--- 是否需要切换编队的功能
|
||||||
this.IsNeedChangeFormation = true
|
this.IsNeedChangeFormation = true
|
||||||
|
|
||||||
function this.Init(root, uid, tname)
|
function this.Init(root, data)
|
||||||
this.root = root
|
this.root = root
|
||||||
this.uid = uid
|
this.pData = data
|
||||||
this.tname = tname
|
|
||||||
this.InitView()
|
this.InitView()
|
||||||
end
|
end
|
||||||
|
|
||||||
--- 获取需要显示的编队id
|
--- 获取需要显示的编队id
|
||||||
function this.GetFormationIndex()
|
function this.GetFormationIndex()
|
||||||
return FormationManager.curFormationIndex
|
return FormationTypeDef.FORMATION_NORMAL
|
||||||
end
|
end
|
||||||
--- 提交按钮点击事件
|
--- 提交按钮点击事件
|
||||||
function this.On_Btn1_Click()
|
function this.On_Btn1_Click()
|
||||||
|
@ -26,9 +25,32 @@ function this.On_Btn1_Click()
|
||||||
PopupTipPanel.ShowTip(string.format(Language[10701], 1))
|
PopupTipPanel.ShowTip(string.format(Language[10701], 1))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if not this.pData then
|
||||||
|
PopupTipPanel.ShowTip("为获取到玩家信息!")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
-- 请求开始挑战
|
-- 请求开始挑战
|
||||||
PlayerManager.RequestPlayWithSomeOne(this.uid, FormationManager.curFormationIndex, this.tname, function()
|
PlayerManager.RequestPlayWithSomeOne(this.pData.uid, FormationTypeDef.FORMATION_NORMAL, this.pData.name, function(result)
|
||||||
this.root:ClosePanel()
|
this.root:ClosePanel()
|
||||||
|
|
||||||
|
local arg = {}
|
||||||
|
arg.result = result
|
||||||
|
arg.blue = {}
|
||||||
|
arg.blue.uid = PlayerManager.uid
|
||||||
|
arg.blue.name = PlayerManager.nickName
|
||||||
|
arg.blue.head = PlayerManager.head
|
||||||
|
arg.blue.frame = PlayerManager.frame
|
||||||
|
arg.red= {}
|
||||||
|
arg.red.uid = this.pData.uid
|
||||||
|
arg.red.name = this.pData.name
|
||||||
|
arg.red.head = this.pData.head
|
||||||
|
arg.red.frame = this.pData.headFrame
|
||||||
|
|
||||||
|
-- 不用回放直接显示结果
|
||||||
|
UIManager.OpenPanel(UIName.ArenaResultPopup, arg)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -354,7 +354,7 @@ end
|
||||||
-- 打他
|
-- 打他
|
||||||
function this.BeatHim()
|
function this.BeatHim()
|
||||||
this:ClosePanel()
|
this:ClosePanel()
|
||||||
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.PLAY, this._PlayerId)
|
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.PLAY, this._PlayerData)
|
||||||
end
|
end
|
||||||
--界面关闭时调用(用于子类重写)
|
--界面关闭时调用(用于子类重写)
|
||||||
function PlayerInfoPopup:OnClose()
|
function PlayerInfoPopup:OnClose()
|
||||||
|
|
Loading…
Reference in New Issue