Merge branch 'china/dev' of http://60.1.1.230/gaoxin/JL_Client into china/dev
commit
3b229cd8fc
|
@ -2277,4 +2277,6 @@
|
|||
[12276] = GetLanguageStrById("灵兽篇"),
|
||||
[12277] = GetLanguageStrById("激活属性:"),
|
||||
[12278] = GetLanguageStrById("激活成功,获得%s%s"),
|
||||
[12279] = GetLanguageStrById("破盾"),
|
||||
[12280] = GetLanguageStrById("清除"),
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ ServerConfigManager.SettingConfig = {
|
|||
ThinkAnalysis_GetDeviceID = "ThinkAnalysis_GetDeviceID", -- 数数获取DeviceID方法
|
||||
LayoutBuilderWrap = "LayoutBuilderWrap", -- 强制刷新layout组件大小的方法修改到lua中调用
|
||||
LanguagePackager = "LanguagePackager", -- 本地化处理
|
||||
UI_Layout_CanvasScaler = "UI_Layout_CanvasScaler", -- 本地化处理
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -62,7 +62,10 @@ function UIManager.Initialize()
|
|||
gameObj.name = "UIRoot"
|
||||
this.eventSystem = GameObject.Find("EventSystem")
|
||||
this.uiRoot = gameObj
|
||||
this.canvasScaler = gameObj.transform:Find("UIRoot"):GetComponent("CanvasScaler")
|
||||
this.isCanvasScaler = ServerConfigManager.IsSettingActive(ServerConfigManager.SettingConfig.UI_Layout_CanvasScaler)
|
||||
if this.isCanvasScaler then
|
||||
this.canvasScaler = gameObj.transform:Find("UIRoot"):GetComponent("CanvasScaler")
|
||||
end
|
||||
this.uiNode = gameObj.transform:Find("UIRoot/UINode")
|
||||
this.fullNode = gameObj.transform:Find("UIRoot/FullNode")
|
||||
this.fixedNode = gameObj.transform:Find("UIRoot/FixedNode")
|
||||
|
@ -122,8 +125,9 @@ function UIManager.Adapter()
|
|||
-- 屏幕大小
|
||||
UIManager.width = Screen.width
|
||||
UIManager.height = Screen.height
|
||||
|
||||
this.canvasScaler.matchWidthOrHeight = 0.5
|
||||
if this.isCanvasScaler then
|
||||
this.canvasScaler.matchWidthOrHeight = 0.5
|
||||
end
|
||||
|
||||
-- 计算屏幕比例的比值,用于部分界面进行屏幕适配的缩放
|
||||
UIManager.adapterScale = (1920/1080)/(Screen.height / Screen.width)
|
||||
|
@ -166,7 +170,10 @@ function UIManager.Adapter()
|
|||
elseif n < standard then
|
||||
-- 计算屏幕比例的比值,用于部分界面进行屏幕适配的缩放
|
||||
UIManager.adapterScale = 1
|
||||
this.canvasScaler.matchWidthOrHeight = 1
|
||||
|
||||
if this.isCanvasScaler then
|
||||
this.canvasScaler.matchWidthOrHeight = 1
|
||||
end
|
||||
|
||||
|
||||
-- 实际分辨率 = 屏幕分辨率 / 比例因子
|
||||
|
|
|
@ -105,7 +105,45 @@ end
|
|||
function this.UpdateTopMatchStage(msg)
|
||||
-- 没有数据或者未开启时重新获取数据
|
||||
if not this.baseInfo or not this.baseInfo.progress or this.baseInfo.progress <= 0 then
|
||||
this.RequestTopMatchBaseInfo()
|
||||
|
||||
local fun = function()
|
||||
-- 获取新的阶段信息
|
||||
this.baseInfo.progress = msg.progress
|
||||
this.baseInfo.endTime = msg.endTime
|
||||
this.BaseDataEndTimeCountDown()
|
||||
Log(string.format("巅峰战阶段刷新 state = %s, progress = %s, endTime = %s, myrank = %s",
|
||||
this.baseInfo.joinState, this.baseInfo.progress, this.baseInfo.endTime, this.baseInfo.myrank))
|
||||
|
||||
-- 刷新基础信息
|
||||
this.RefreshBaseInfo()
|
||||
-- Game.GlobalEvent:DispatchEvent(GameEvent.TopMatch.OnTopMatchDataUpdate)
|
||||
-- --刷新排行信息
|
||||
-- Game.GlobalEvent:DispatchEvent(GameEvent.ATM_RankView.OnRankChange)
|
||||
LogGreen("this.baseInfo.battleState "..this.baseInfo.battleState)
|
||||
|
||||
-- 切换到准备阶段刷新一遍数据
|
||||
-- if this.baseInfo.battleState == TOP_MATCH_TIME_STATE.OPEN_IN_READY then
|
||||
-- this.RequestTopMatchBaseInfo()
|
||||
-- --this.RequestBetBaseInfo()
|
||||
-- -- 竞猜阶段刷新竞猜数据
|
||||
-- else
|
||||
if this.baseInfo.battleState == TOP_MATCH_TIME_STATE.OPEN_IN_GUESS then
|
||||
this.RequestTopMatchBaseInfo()
|
||||
this.RequestBetBaseInfo()
|
||||
-- 战斗阶段不刷新
|
||||
--elseif this.baseInfo.battleState == TOP_MATCH_TIME_STATE.OPEN_IN_GUESS then
|
||||
-- 切换到结算阶段刷新一遍所有数据
|
||||
elseif this.baseInfo.battleState == TOP_MATCH_TIME_STATE.OPEN_IN_END then
|
||||
this.RequestTopMatchBaseInfo()
|
||||
this.RequestBetBaseInfo(nil,true)
|
||||
end
|
||||
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.TopMatch.OnTopMatchDataUpdate)
|
||||
--刷新排行信息
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.ATM_RankView.OnRankChange)
|
||||
end
|
||||
|
||||
this.RequestTopMatchBaseInfo(fun)
|
||||
return
|
||||
end
|
||||
|
||||
|
|
|
@ -196,12 +196,12 @@ function this.OnShowRefresh()
|
|||
isShow = isActive and (battleStage == TOP_MATCH_STAGE.ELIMINATION or battleStage == TOP_MATCH_STAGE.CHOOSE) and progress ~= -2
|
||||
-- LogGreen("battleStage "..battleStage.." isActive "..tostring(isActive).." progress "..progress.." isShow "..tostring(isShow))
|
||||
this.guessPanel:SetActive(isShow)
|
||||
commonInfo.SetActive(isShow)
|
||||
-- commonInfo.SetActive(isShow)
|
||||
this.emptyPanel:SetActive(not isShow)
|
||||
end
|
||||
function this.RefreshBaseShow()
|
||||
local IsCanBet = ArenaTopMatchManager.IsCanBet()
|
||||
-- LogGreen("IsCanBet "..tostring(IsCanBet))
|
||||
LogGreen("IsCanBet "..tostring(IsCanBet))
|
||||
if IsCanBet then -- 判断是否有竞猜信息
|
||||
local betBattleInfo = ArenaTopMatchManager.GetBetBattleInfo()
|
||||
this.emptyPanel:SetActive(false)
|
||||
|
|
|
@ -59,14 +59,14 @@ function ATM_MainMatchView:BindEvent()
|
|||
end
|
||||
--添加事件监听(用于子类重写)
|
||||
function ATM_MainMatchView:AddListener()
|
||||
Game.GlobalEvent:AddEvent(GameEvent.TopMatch.OnTopMatchDataUpdate, this.OnOpen, this)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.TopMatch.OnTopMatchDataUpdate, this.OnOpenData)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.ATM_RankView.OnOpenBattle, this.battleDetailBtnClick)
|
||||
|
||||
end
|
||||
|
||||
--移除事件监听(用于子类重写)
|
||||
function ATM_MainMatchView:RemoveListener()
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.TopMatch.OnTopMatchDataUpdate, this.OnOpen, this)
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.TopMatch.OnTopMatchDataUpdate, this.OnOpenData)
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.ATM_RankView.OnOpenBattle, this.battleDetailBtnClick)
|
||||
end
|
||||
|
||||
|
@ -75,20 +75,26 @@ function ATM_MainMatchView:OnOpen(...)
|
|||
local isActive = ArenaTopMatchManager.IsTopMatchActive()
|
||||
this.StateChange(isActive)
|
||||
end
|
||||
|
||||
function this.OnOpenData()
|
||||
local isActive = ArenaTopMatchManager.IsTopMatchActive()
|
||||
-- LogBlue("isActive "..tostring(isActive))
|
||||
this.StateChange(isActive)
|
||||
end
|
||||
-- 状态切换
|
||||
local isJoin = nil
|
||||
local isOver = nil
|
||||
local baseData
|
||||
function this.StateChange(isOpen)
|
||||
local isOpen = ArenaTopMatchManager.IsTopMatchActive()
|
||||
-- LogBlue("isOpen "..tostring(isOpen))
|
||||
baseData = ArenaTopMatchManager.GetBaseData()
|
||||
-- 没开启或者开启没参赛都属于未参赛
|
||||
isJoin = baseData.joinState == 1
|
||||
isOver = baseData.progress == -2
|
||||
LogGreen("isOpen "..tostring(isOpen).." "..tostring(isJoin).." "..tostring(isOver).." "..baseData.joinState)
|
||||
-- LogGreen("isOpen "..tostring(isOpen).." "..tostring(isJoin).." "..tostring(isOver).." "..baseData.joinState)
|
||||
local battleInfo = ArenaTopMatchManager.GetBattleInfo()
|
||||
LogGreen("battleInfo.result "..battleInfo.result.." baseData.battleState "..baseData.battleState)
|
||||
LogGreen("baseData.loser "..tostring(baseData.loser))
|
||||
-- LogGreen("battleInfo.result "..battleInfo.result.." baseData.battleState "..baseData.battleState)
|
||||
-- LogGreen("baseData.loser "..tostring(baseData.loser))
|
||||
if isOpen then
|
||||
if isJoin then
|
||||
this.SetPlayerInfo()
|
||||
|
|
|
@ -978,9 +978,9 @@ function this.GetArtFontConfig(_ArtFontType)
|
|||
if _ArtFontType == BattleArtFontType.Immune then
|
||||
return {type = 2, content = Language[10203]}
|
||||
elseif _ArtFontType == BattleArtFontType.Shield then
|
||||
return {type = 2, content = Language[12236]}
|
||||
return {type = 2, content = Language[12279]}
|
||||
elseif _ArtFontType == BattleArtFontType.clear then
|
||||
return {type = 2, content = Language[12237]}
|
||||
return {type = 2, content = Language[12280]}
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ end
|
|||
|
||||
--加载三个立绘(称号 坐骑 皮肤)
|
||||
function PlayerLiveView:OnShowLive()
|
||||
LogBlue("self.rideLiveGo "..self.rideLiveGo.name)
|
||||
-- LogBlue("self.rideLiveGo "..self.rideLiveGo.name)
|
||||
self.rideLiveGo:SetActive(false)
|
||||
self.playerLiveGo:SetActive(false)
|
||||
self.titleLiveGo:SetActive(false)
|
||||
|
@ -262,14 +262,14 @@ function PlayerLiveView:SetWalkDir(dir)
|
|||
end
|
||||
function PlayerLiveView:SetWalkDirInfo(playerDir,RideDir)
|
||||
if playerDir and (self.oldPlayerDirAnimation ~= playerDir.animation or self.oldPlayerDiry ~= playerDir.y) then
|
||||
LogBlue("PlayerLiveView playerDir : "..playerDir.animation .." ".. playerDir.y)
|
||||
-- LogBlue("PlayerLiveView playerDir : "..playerDir.animation .." ".. playerDir.y)
|
||||
self.playerLiveSkeletonGraphic.transform.localEulerAngles = Vector3.New(0, playerDir.y, 0)
|
||||
self.playerLiveSkeletonGraphic.AnimationState:SetAnimation(0, playerDir.animation, true)
|
||||
self.oldPlayerDirAnimation = playerDir.animation
|
||||
self.oldPlayerDiry = playerDir.y
|
||||
end
|
||||
if RideDir and (self.oldRideDirAnimation ~= RideDir.animation or self.oldRideDiry ~= RideDir.y) then
|
||||
LogBlue("PlayerLiveView RideDir : "..RideDir.animation .." ".. RideDir.y)
|
||||
-- LogBlue("PlayerLiveView RideDir : "..RideDir.animation .." ".. RideDir.y)
|
||||
self.rideLivSkeletonGraphic.transform.localEulerAngles = Vector3.New(0, RideDir.y, 0)
|
||||
self.rideLivSkeletonGraphic.AnimationState:SetAnimation(0, RideDir.animation, true)
|
||||
self.oldRideDirAnimation = RideDir.animation
|
||||
|
|
|
@ -2276,3 +2276,5 @@
|
|||
12276,灵兽篇
|
||||
12277,激活属性:
|
||||
12278,激活成功,获得%s%s
|
||||
12279,팎뜀
|
||||
12280,헌뇜
|
||||
|
|
|
Loading…
Reference in New Issue