竞技场动画
This commit is contained in:
parent
e801062ca8
commit
e15975a2cb
@ -62,6 +62,7 @@ function ArenaMatchUI:onLoadRootComplete()
|
||||
local uiMap = self.root:genAllChildren()
|
||||
|
||||
-- 匹配等待页
|
||||
self.matchSpine = uiMap["arena_match_ui.ui_spine_obj"]
|
||||
self.matchLoading = uiMap["arena_match_ui.match_loading"]
|
||||
self.txSeason = uiMap["arena_match_ui.match_loading.tx_season"]
|
||||
self.txLoading = uiMap["arena_match_ui.match_loading.tx_loading"]
|
||||
@ -73,17 +74,17 @@ function ArenaMatchUI:onLoadRootComplete()
|
||||
self.btnClose = uiMap["arena_match_ui.match_result.btn_close"]
|
||||
self.matchAnimator = self.matchResult:getComponent(GConst.TYPEOF_UNITY_CLASS.ANIMATOR)
|
||||
-- 对手信息
|
||||
self.matchAvatar = CellManager:addCellComp(uiMap["arena_match_ui.match_result.match.info.player_head_cell"], GConst.TYPEOF_LUA_CLASS.PLAYER_HEAD_CELL)
|
||||
self.matchTxName = uiMap["arena_match_ui.match_result.match.info.tx_name"]
|
||||
self.matchTxLevel = uiMap["arena_match_ui.match_result.match.info.tx_level"]
|
||||
self.matchGrading = uiMap["arena_match_ui.match_result.match.arena_grading_cell"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.ARENA_GRADING_CELL)
|
||||
self.matchHeroFormationComp = uiMap["arena_match_ui.match_result.match.formation.hero_formation_comp"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.HERO_FORMATION_COMP)
|
||||
self.matchAvatar = CellManager:addCellComp(uiMap["arena_match_ui.match_result.left_node.match.info.player_head_cell"], GConst.TYPEOF_LUA_CLASS.PLAYER_HEAD_CELL)
|
||||
self.matchTxName = uiMap["arena_match_ui.match_result.left_node.match.info.tx_name"]
|
||||
self.matchTxLevel = uiMap["arena_match_ui.match_result.left_node.match.info.tx_level"]
|
||||
self.matchGrading = uiMap["arena_match_ui.match_result.left_node.match.arena_grading_cell"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.ARENA_GRADING_CELL)
|
||||
self.matchHeroFormationComp = uiMap["arena_match_ui.match_result.left_node.match.formation.hero_formation_comp"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.HERO_FORMATION_COMP)
|
||||
-- 自己信息
|
||||
self.selfAvatar = CellManager:addCellComp(uiMap["arena_match_ui.match_result.self.info.player_head_cell"], GConst.TYPEOF_LUA_CLASS.PLAYER_HEAD_CELL)
|
||||
self.selfTxName = uiMap["arena_match_ui.match_result.self.info.tx_name"]
|
||||
self.selfTxLevel = uiMap["arena_match_ui.match_result.self.info.tx_level"]
|
||||
self.selfGrading = uiMap["arena_match_ui.match_result.self.arena_grading_cell"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.ARENA_GRADING_CELL)
|
||||
self.selfHeroFormationComp = uiMap["arena_match_ui.match_result.self.formation.hero_formation_comp"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.HERO_FORMATION_COMP)
|
||||
self.selfAvatar = CellManager:addCellComp(uiMap["arena_match_ui.match_result.right_node.self.info.player_head_cell"], GConst.TYPEOF_LUA_CLASS.PLAYER_HEAD_CELL)
|
||||
self.selfTxName = uiMap["arena_match_ui.match_result.right_node.self.info.tx_name"]
|
||||
self.selfTxLevel = uiMap["arena_match_ui.match_result.right_node.self.info.tx_level"]
|
||||
self.selfGrading = uiMap["arena_match_ui.match_result.right_node.self.arena_grading_cell"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.ARENA_GRADING_CELL)
|
||||
self.selfHeroFormationComp = uiMap["arena_match_ui.match_result.right_node.self.formation.hero_formation_comp"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.HERO_FORMATION_COMP)
|
||||
-- 功能按钮
|
||||
self.btnStart = uiMap["arena_match_ui.match_result.btn_start"]
|
||||
self.imgCost = uiMap["arena_match_ui.match_result.btn_start.cost.img_cost"]
|
||||
@ -127,7 +128,10 @@ function ArenaMatchUI:onRefresh()
|
||||
ModuleManager.ArenaManager:reqMatch()
|
||||
self:showMatchLoading()
|
||||
else
|
||||
self.matchSpine:setActive(true)
|
||||
self.matchSpine:playAnimComplete("die", false, true, function()
|
||||
self:showMatchResult()
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
@ -136,6 +140,10 @@ function ArenaMatchUI:showMatchLoading()
|
||||
self.matchLoading:setActive(true)
|
||||
self.matchResult:setActive(false)
|
||||
UIManager:setBarsVisible(self, false)
|
||||
self.matchSpine:setActive(true)
|
||||
self.matchSpine:playAnimComplete("born", false, true, function()
|
||||
self.matchSpine:playAnim("idle", true, true)
|
||||
end)
|
||||
|
||||
self.txSeason:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_21, DataManager.ArenaData:getSeason()))
|
||||
self.txLoading:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_22))
|
||||
@ -146,7 +154,10 @@ function ArenaMatchUI:showMatchLoading()
|
||||
self:unscheduleGlobal(self.waitSid)
|
||||
end
|
||||
self.waitSid = self:performWithDelayGlobal(function()
|
||||
self.matchSpine:setActive(true)
|
||||
self.matchSpine:playAnimComplete("die", false, true, function()
|
||||
self:showMatchResult()
|
||||
end)
|
||||
end, 1.5)
|
||||
end
|
||||
|
||||
@ -162,9 +173,9 @@ function ArenaMatchUI:showMatchResult()
|
||||
self.matchResult:setActive(true)
|
||||
UIManager:setBarsVisible(self, true)
|
||||
|
||||
self.spineVS:playAnimComplete("born", false, true, function()
|
||||
self.spineVS:playAnim("idle", true, true)
|
||||
end)
|
||||
-- self.spineVS:playAnimComplete("born", false, true, function()
|
||||
-- self.spineVS:playAnim("idle", true, true)
|
||||
-- end)
|
||||
|
||||
self.txStart:setText(I18N:getGlobalText(I18N.GlobalConst.TASK_CHALLENGE))
|
||||
self.txConst:setText(DataManager.ArenaData:getFightCostNum())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user