Merge branch '0功能/玉虚论道' of http://60.1.1.230/gaoxin/JL_Client into 0功能/玉虚论道
Conflicts: Assets/ManagedResources/~Lua/Modules/WorldArena/WorldArenaBattleInfoPanel.luadev_chengFeng
commit
159f2e2494
|
|
@ -892,7 +892,7 @@ MonoBehaviour:
|
|||
m_BestFit: 0
|
||||
m_MinSize: 3
|
||||
m_MaxSize: 45
|
||||
m_Alignment: 0
|
||||
m_Alignment: 1
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 1
|
||||
|
|
@ -1428,9 +1428,9 @@ RectTransform:
|
|||
m_Father: {fileID: 5186622360375891445}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 192.5, y: -179}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 10, y: 308.55}
|
||||
m_SizeDelta: {x: 385, y: 358}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &1493750792
|
||||
|
|
@ -2011,7 +2011,7 @@ MonoBehaviour:
|
|||
m_BestFit: 0
|
||||
m_MinSize: 3
|
||||
m_MaxSize: 45
|
||||
m_Alignment: 0
|
||||
m_Alignment: 1
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 1
|
||||
|
|
@ -4034,9 +4034,9 @@ RectTransform:
|
|||
m_Father: {fileID: 5186622360375891445}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 192.5, y: -481}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 10, y: 6.549988}
|
||||
m_SizeDelta: {x: 385, y: 358}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &946039569063552125
|
||||
|
|
@ -4072,9 +4072,9 @@ RectTransform:
|
|||
m_Father: {fileID: 4703390379678214157}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 192.5, y: -783}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 10, y: -295.44998}
|
||||
m_SizeDelta: {x: 385, y: 358}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &962637960711437815
|
||||
|
|
@ -6903,7 +6903,7 @@ MonoBehaviour:
|
|||
m_BestFit: 0
|
||||
m_MinSize: 3
|
||||
m_MaxSize: 45
|
||||
m_Alignment: 0
|
||||
m_Alignment: 1
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 1
|
||||
|
|
@ -11028,7 +11028,7 @@ MonoBehaviour:
|
|||
m_BestFit: 0
|
||||
m_MinSize: 3
|
||||
m_MaxSize: 45
|
||||
m_Alignment: 0
|
||||
m_Alignment: 1
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 1
|
||||
|
|
@ -11599,7 +11599,7 @@ MonoBehaviour:
|
|||
m_BestFit: 0
|
||||
m_MinSize: 3
|
||||
m_MaxSize: 45
|
||||
m_Alignment: 0
|
||||
m_Alignment: 1
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 1
|
||||
|
|
@ -11757,7 +11757,7 @@ MonoBehaviour:
|
|||
m_BestFit: 0
|
||||
m_MinSize: 3
|
||||
m_MaxSize: 45
|
||||
m_Alignment: 0
|
||||
m_Alignment: 1
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 1
|
||||
|
|
@ -13294,9 +13294,9 @@ RectTransform:
|
|||
m_Father: {fileID: 4703390379678214157}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 192.5, y: -179}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 10, y: 308.55}
|
||||
m_SizeDelta: {x: 385, y: 358}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &4233438366005003641
|
||||
|
|
@ -17352,9 +17352,9 @@ RectTransform:
|
|||
m_Father: {fileID: 4703390379678214157}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 192.5, y: -481}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 10, y: 6.549988}
|
||||
m_SizeDelta: {x: 385, y: 358}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &5772368194543481208
|
||||
|
|
@ -22530,9 +22530,9 @@ RectTransform:
|
|||
m_Father: {fileID: 5186622360375891445}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 192.5, y: -783}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 10, y: -295.44998}
|
||||
m_SizeDelta: {x: 385, y: 358}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &7716782139807800611
|
||||
|
|
|
|||
|
|
@ -1684,6 +1684,7 @@ HELP_TYPE = {
|
|||
JourneyWithWind = 98,--缥缈之旅
|
||||
ShanHeShiLian = 96,--山河试炼
|
||||
AgeTip = 104,--适龄提示
|
||||
YuXu = 107,--玉虚论道
|
||||
}
|
||||
|
||||
NumToComplexFont = {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ require("Base/BasePanel")
|
|||
local WorldArenaBattleInfoPanel = Inherit(BasePanel)
|
||||
local this = WorldArenaBattleInfoPanel
|
||||
|
||||
local state=1 -- 1:开战前 2.:开战中 3:开战后
|
||||
local state=1 -- 1:开战前 2.:开战中 3:开战后
|
||||
local myHeadObj=nil
|
||||
local enHeadObj=nil
|
||||
local resultList={}
|
||||
|
|
@ -14,6 +14,10 @@ local enInfoData=nil
|
|||
|
||||
local targetIndex=0
|
||||
local currIndex=0
|
||||
|
||||
local isAnim = false
|
||||
local _CloseFunc = nil
|
||||
|
||||
local function OnBeginDrag(self, Pointgo, data)
|
||||
if state~=1 then
|
||||
return
|
||||
|
|
@ -172,18 +176,43 @@ function this.RefreshBattleCastInfo()
|
|||
end
|
||||
end
|
||||
|
||||
function WorldArenaBattleInfoPanel:PlayFightAnim(leftList, rightList, num, func)
|
||||
coroutine.start(function()
|
||||
for i = 1, num do
|
||||
leftList[i].transform:DOLocalMoveX(90, 0.2, false):OnComplete(function()
|
||||
leftList[i].transform:DOLocalMoveX(10, 0.3, false):OnComplete(function()
|
||||
if func then
|
||||
func(i)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
rightList[i].transform:DOLocalMoveX(-80, 0.2, false):OnComplete(function()
|
||||
rightList[i].transform:DOLocalMoveX(10, 0.3, false)
|
||||
end)
|
||||
coroutine.wait(0.2)
|
||||
end
|
||||
end)
|
||||
end
|
||||
--绑定事件(用于子类重写)
|
||||
function WorldArenaBattleInfoPanel:BindEvent()
|
||||
Util.AddClick(this.btn_close, function()
|
||||
|
||||
if state==2 then
|
||||
return
|
||||
end
|
||||
self:ClosePanel()
|
||||
if not isAnim then
|
||||
self:ClosePanel()
|
||||
end
|
||||
|
||||
end)
|
||||
Util.AddClick(this.btn_fight, function()
|
||||
-- 动画中不能再执行
|
||||
if isAnim then
|
||||
return
|
||||
end
|
||||
if type~=1 then
|
||||
self:ClosePanel()
|
||||
return
|
||||
return
|
||||
end
|
||||
local list={2001,2002,2003}
|
||||
NetManager.CrossYuXuLunDaoChallengeRequest(list,enemyId,1,function(msg)
|
||||
|
|
@ -191,37 +220,50 @@ function WorldArenaBattleInfoPanel:BindEvent()
|
|||
resultList=msg.fightResult
|
||||
fightDataList=msg.fightData
|
||||
LogError("myscore=="..msg.myScore.."defScore=="..msg.defScore)
|
||||
|
||||
isAnim = true
|
||||
self:PlayFightAnim(this.leftTeam, this.rightTeam, 3, function(index)
|
||||
this.ShowBattleState(index,3)
|
||||
this.playBacks[index]:SetActive(true)
|
||||
if index >= 3 then
|
||||
isAnim = false
|
||||
state = 3
|
||||
type = 2
|
||||
this.btnText.text="确定"
|
||||
end
|
||||
end)
|
||||
-- for i = 1, #this.playBacks do
|
||||
-- this.playBacks[i]:SetActive(true)
|
||||
-- end
|
||||
--播放打的动画
|
||||
if this.TimeCounter then
|
||||
this.TimeCounter=nil
|
||||
end
|
||||
local currIndex=1
|
||||
local _TimeUpdate=function()
|
||||
-- if this.TimeCounter then
|
||||
-- this.TimeCounter=nil
|
||||
-- end
|
||||
-- local currIndex=1
|
||||
-- local _TimeUpdate=function()
|
||||
|
||||
this.rightTeam[currIndex]:GetComponent("RectTransform").anchoredPosition=Vector3.New(101,this.rightTeam[currIndex]:GetComponent("RectTransform").anchoredPosition.y,0)
|
||||
this.leftTeam[currIndex]:GetComponent("RectTransform").anchoredPosition=Vector3.New(278,this.leftTeam[currIndex]:GetComponent("RectTransform").anchoredPosition.y,0)
|
||||
LogError("left pos.x=="..this.leftTeam[currIndex].transform.localPosition.x)
|
||||
LogError("right pos.x=="..this.rightTeam[currIndex].transform.localPosition.x)
|
||||
this.playBacks[currIndex]:SetActive(true)
|
||||
this.ShowBattleState(currIndex,3)
|
||||
this.leftTeam[currIndex]:GetComponent("RectTransform").anchoredPosition=Vector3.New(192,this.leftTeam[currIndex]:GetComponent("RectTransform").anchoredPosition.y,0)
|
||||
this.rightTeam[currIndex]:GetComponent("RectTransform").anchoredPosition=Vector3.New(192,this.rightTeam[currIndex]:GetComponent("RectTransform").anchoredPosition.y,0)
|
||||
LogError("left pos.x=="..this.leftTeam[currIndex].transform.localPosition.x)
|
||||
LogError("right pos.x=="..this.rightTeam[currIndex].transform.localPosition.x)
|
||||
LogError("--------------")
|
||||
state=2
|
||||
currIndex=currIndex+1
|
||||
if this.TimeCounter and currIndex>3 then
|
||||
this.TimeCounter:Stop()
|
||||
this.TimeCounter = nil
|
||||
state=3
|
||||
end
|
||||
end
|
||||
this.TimeCounter = Timer.New(_TimeUpdate,1.5, -1, true)
|
||||
this.TimeCounter:Start()
|
||||
-- this.rightTeam[currIndex]:GetComponent("RectTransform").anchoredPosition=Vector3.New(101,this.rightTeam[currIndex]:GetComponent("RectTransform").anchoredPosition.y,0)
|
||||
-- this.leftTeam[currIndex]:GetComponent("RectTransform").anchoredPosition=Vector3.New(278,this.leftTeam[currIndex]:GetComponent("RectTransform").anchoredPosition.y,0)
|
||||
-- LogError("left pos.x=="..this.leftTeam[currIndex].transform.localPosition.x)
|
||||
-- LogError("right pos.x=="..this.rightTeam[currIndex].transform.localPosition.x)
|
||||
-- this.playBacks[currIndex]:SetActive(true)
|
||||
-- this.ShowBattleState(currIndex,3)
|
||||
-- this.leftTeam[currIndex]:GetComponent("RectTransform").anchoredPosition=Vector3.New(192,this.leftTeam[currIndex]:GetComponent("RectTransform").anchoredPosition.y,0)
|
||||
-- this.rightTeam[currIndex]:GetComponent("RectTransform").anchoredPosition=Vector3.New(192,this.rightTeam[currIndex]:GetComponent("RectTransform").anchoredPosition.y,0)
|
||||
-- LogError("left pos.x=="..this.leftTeam[currIndex].transform.localPosition.x)
|
||||
-- LogError("right pos.x=="..this.rightTeam[currIndex].transform.localPosition.x)
|
||||
-- LogError("--------------")
|
||||
-- state=2
|
||||
-- currIndex=currIndex+1
|
||||
-- if this.TimeCounter and currIndex>3 then
|
||||
-- this.TimeCounter:Stop()
|
||||
-- this.TimeCounter = nil
|
||||
-- state=3
|
||||
-- end
|
||||
-- end
|
||||
-- this.TimeCounter = Timer.New(_TimeUpdate,1.5, -1, true)
|
||||
-- this.TimeCounter:Start()
|
||||
|
||||
end)
|
||||
end)
|
||||
|
||||
|
|
@ -276,15 +318,18 @@ function WorldArenaBattleInfoPanel:RemoveListener()
|
|||
end
|
||||
|
||||
--界面打开时调用(用于子类重写)
|
||||
function WorldArenaBattleInfoPanel:OnOpen(msg,_type,list)
|
||||
|
||||
function WorldArenaBattleInfoPanel:OnOpen(msg,_type,closeFunc,list)
|
||||
-- 请求数据
|
||||
-- ArenaManager.RequestArenaRecord()
|
||||
type=_type
|
||||
_CloseFunc = closeFunc
|
||||
-- 刷新显示
|
||||
-- this.RefreshRecordList()
|
||||
if state==1 then
|
||||
for i = 1, 3 do
|
||||
this.playBacks[i]:SetActive(false)
|
||||
this.ShowBattleState(i, state)
|
||||
end
|
||||
end
|
||||
if type==1 then
|
||||
|
|
@ -438,7 +483,17 @@ function this:OnClose()
|
|||
this.TimeCounter:Stop()
|
||||
this.TimeCounter = nil
|
||||
end
|
||||
state=1
|
||||
-- 执行关闭方法
|
||||
if _CloseFunc then
|
||||
-- 如果是挑战完成了,返回就刷新挑战列表
|
||||
if state == 3 then
|
||||
_CloseFunc()
|
||||
end
|
||||
_CloseFunc = nil
|
||||
end
|
||||
-- 重置状态
|
||||
state = 1
|
||||
isAnim = false
|
||||
end
|
||||
|
||||
--界面销毁时调用(用于子类重写)
|
||||
|
|
|
|||
|
|
@ -96,7 +96,9 @@ function WorldArenaMainPanel:BindEvent()
|
|||
LogError("/////////////////")
|
||||
NetManager.CrossYuXuLunDaoChallengeBeforeRequest(PlayerManager.uid,enemyList[i],function(msg)
|
||||
LogError("open battleinfo ???")
|
||||
UIManager.OpenPanel(UIName.WorldArenaBattleInfoPanel,msg,1)
|
||||
UIManager.OpenPanel(UIName.WorldArenaBattleInfoPanel,msg,1, function()
|
||||
self:RefreshChallengeList()
|
||||
end)
|
||||
end)
|
||||
else
|
||||
PopupTipPanel.ShowTip(Language[10092])
|
||||
|
|
@ -109,14 +111,7 @@ function WorldArenaMainPanel:BindEvent()
|
|||
end)
|
||||
-- 刷新按钮
|
||||
Util.AddClick(this.RefreshBtn, function()
|
||||
PlaySoundWithoutClick("UI_refresh")
|
||||
if not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.ARENA) then
|
||||
PopupTipPanel.ShowTip(Language[10075])
|
||||
return
|
||||
end
|
||||
NetManager.CrossYuXuLunDaoChangeEnemyInfoRequest(function(msg)
|
||||
this:RefreshEnemyData(msg.arenaEnemys)
|
||||
end)
|
||||
self:RefreshChallengeList()
|
||||
end)
|
||||
-- 记录按钮
|
||||
Util.AddClick(this.RecordBtn, function()
|
||||
|
|
@ -132,7 +127,7 @@ function WorldArenaMainPanel:BindEvent()
|
|||
end)
|
||||
-- 帮助按钮
|
||||
Util.AddClick(this.helpBtn, function()
|
||||
UIManager.OpenPanel(UIName.HelpPopup,HELP_TYPE.Arena,this.helpPosition.x,this.helpPosition.y)
|
||||
UIManager.OpenPanel(UIName.HelpPopup,HELP_TYPE.YuXu,this.helpPosition.x,this.helpPosition.y)
|
||||
end)
|
||||
-- 奖励按钮
|
||||
Util.AddClick(this.RewardBtn, function()
|
||||
|
|
@ -153,6 +148,18 @@ function WorldArenaMainPanel:BindEvent()
|
|||
|
||||
end
|
||||
|
||||
-- 刷新挑战列表
|
||||
function WorldArenaMainPanel:RefreshChallengeList()
|
||||
if not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.ARENA) then
|
||||
PopupTipPanel.ShowTip(Language[10075])
|
||||
return
|
||||
end
|
||||
NetManager.CrossYuXuLunDaoChangeEnemyInfoRequest(function(msg)
|
||||
PlaySoundWithoutClick("UI_refresh")
|
||||
this:RefreshEnemyData(msg.arenaEnemys)
|
||||
end)
|
||||
end
|
||||
|
||||
--添加事件监听(用于子类重写)
|
||||
function WorldArenaMainPanel:AddListener()
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue