Merge branch 'china/dev-c' of http://60.1.1.230/gaoxin/JL_Client into china/dev-c

dev_chengFeng
ZhangBiao 2021-06-02 14:50:26 +08:00
commit 0798248214
8 changed files with 38 additions and 51 deletions

View File

@ -13,6 +13,7 @@ ServerConfigManager.SettingConfig = {
NOTICE_CHANNEL = "NOTICE_CHANNEL", -- 公告号
PACKAGE_CC_CODE = "PACKAGE_CC_CODE", -- CC号
SPRITE_LOADER = "SPRITE_LOADER", -- 资源加载器是否可以使用
IS_TITLE_EFFECT_SCALE = "IS_TITLE_EFFECT_SCALE", -- 判断
}

View File

@ -16,6 +16,8 @@ local _TabData = {
}
-- 当前所在的聊天通道
this._CurChannel = 1
-- 称号
local titleList={}
--初始化组件(用于子类重写)
function ChatPanel:InitComponent()
@ -91,6 +93,14 @@ end
function ChatPanel:RemoveListener()
Game.GlobalEvent:RemoveEvent(GameEvent.Chat.OnChatDataChanged, this.OnChatDataChanged)
end
function ChatPanel:OnSortingOrderChange()
if titleList then
for node, playerTitle in pairs(titleList) do
playerTitle:SetLayer(this.sortingOrder)
end
end
end
--界面打开时调用(用于子类重写)
function ChatPanel:OnOpen(...)
-- 参数保存
@ -142,6 +152,14 @@ function ChatPanel:OnDestroy()
ClearRedPointObject(v.rpType)
end
end
if titleList then
for node, playerTitle in pairs(titleList) do
SubUIManager.Close(playerTitle)
end
end
titleList = {}
end
-- tab节点自定义设置
@ -312,8 +330,6 @@ function this.GetScrollView(index)
end
end
local titleList={}
local titleStrList={}
-- 好友节点数据匹配
function this.FriendItemAdapter(node, data)
-- 获取节点
@ -333,30 +349,14 @@ function this.FriendItemAdapter(node, data)
head.sprite = GetPlayerHeadSprite(this.spLoader, fdata.head)
frame.sprite = GetPlayerHeadFrameSprite(this.spLoader, fdata.frame)
redpot:SetActive(FriendChatManager.IsFriendNewChat(data.friendId))
if titleList[node] then
poolManager:UnLoadAsset(titleStrList[node],titleList[node], PoolManager.AssetType.GameObject)
titleStrList[node] = nil
titleList[node] = nil
end
local title=fdata.userTitle
if title and title>0 then
local title = fdata.userTitle
if title and title > 0 then
titlePar:SetActive(true)
local curPlayerRole = ConfigManager.GetConfigData(ConfigName.PlayerRole,title)
local curArtResourcesConfig = ConfigManager.GetConfigData(ConfigName.ArtResourcesConfig,curPlayerRole.LiveAnimName)
local titleLiveStr = curArtResourcesConfig.Name
local titleLive = poolManager:LoadAsset(titleLiveStr, PoolManager.AssetType.GameObject)
titleLive.transform:SetParent(titlePar.transform)
titleLive.transform.localPosition = Vector3.New(0,0,0)
titleLive.transform.localScale = Vector3.New(0.4,0.4,0.4)
local sortingorder=0
if this.sortingOrder then
Util.SetParticleSortLayer(titleLive,this.sortingOrder)
-- sortingorder = this.sortingOrder
if not titleList[node] then
titleList[node] = SubUIManager.Open(SubUIConfig.PlayerTitle, titlePar.transform)
end
titleStrList[node]=titleLiveStr
titleList[node]=titleLive
titleList[node]:SetShow(title, Vector3.zero, 0.4, 0.4, this.sortingOrder)
else
titlePar:SetActive(false)
end
@ -442,13 +442,6 @@ function this.ChatItemAdapter(node, data, isShowTime)
timeLab.text = TimeStampToDateStr(tonumber(data.times)/1000)
end
if titleList[node] then
poolManager:UnLoadAsset(titleStrList[node],titleList[node], PoolManager.AssetType.GameObject)
titleStrList[node] = nil
titleList[node] = nil
end
local contentStr = ""
if this._CurChannel == CHAT_CHANNEL.GLOBAL then
local chat = ChatManager.AnalysisGlobalChat(data.msg)
@ -531,20 +524,10 @@ function this.ChatItemAdapter(node, data, isShowTime)
end
if title and title>0 then
titlePar:SetActive(true)
local curPlayerRole = ConfigManager.GetConfigData(ConfigName.PlayerRole,title)
local curArtResourcesConfig = ConfigManager.GetConfigData(ConfigName.ArtResourcesConfig,curPlayerRole.LiveAnimName)
local titleLiveStr = curArtResourcesConfig.Name
local titleLive = poolManager:LoadAsset(titleLiveStr, PoolManager.AssetType.GameObject)
titleLive.transform:SetParent(titlePar.transform)
titleLive.transform.localPosition = Vector3.New(0,0,0)
titleLive.transform.localScale = Vector3.New(0.4,0.4,0.4)
local sortingorder=0
if this.sortingOrder then
Util.SetParticleSortLayer(titleLive,this.sortingOrder)
-- sortingorder = this.sortingOrder
if not titleList[node] then
titleList[node] = SubUIManager.Open(SubUIConfig.PlayerTitle, titlePar.transform)
end
titleStrList[node]=titleLiveStr
titleList[node]=titleLive
titleList[node]:SetShow(title, Vector3.zero, 0.4, 0.4, this.sortingOrder)
else
titlePar:SetActive(false)
end

View File

@ -100,7 +100,7 @@ function HongMengEnvoyPanel:BindEvent()
self.UnShowText:SetActive(true)
self.UpBtnRedPoint:SetActive(false)
end
self.GradeText.text = Language[12202]..string.format("%d/%d", HarmonyManager.GetSingleAdditionsData(HarmonyAddType.AddLv).value, sum)
self.GradeText.text = "鸿蒙碑等级:"..string.format("%d/%d", HarmonyManager.GetSingleAdditionsData(HarmonyAddType.AddLv).value, sum)
for i = 1, #self.EnvoyItemList do
self.EnvoyItemList[i]:UpdateFun()
end
@ -256,7 +256,7 @@ function HongMengEnvoyPanel:OnOpen(equipSId)
local sum = HarmonyManager:HongMengTowerUpLimit()
self.GradeText.text = Language[12202]..string.format("%d/%d", HarmonyManager.GetSingleAdditionsData(HarmonyAddType.AddLv).value, sum)
self.GradeText.text = "鸿蒙碑等级:"..string.format("%d/%d", HarmonyManager.GetSingleAdditionsData(HarmonyAddType.AddLv).value, sum)
self:IsUpBtnGray()
self:InitTextMum()
self:CheckEvoyEquip()

View File

@ -691,7 +691,7 @@ function this:OnSortingOrderChange()
Util.GetGameObject(self.sceneTran.gameObject, "layer7"):GetComponent("Canvas").sortingOrder = self.sortingOrder - 3
this.npcRoot:GetComponent("Canvas").sortingOrder = self.sortingOrder - 2
this.decorateRoot:GetComponent("Canvas").sortingOrder = self.sortingOrder - 1
Util.AddParticleSortLayer(this.btnClickMove, self.sortingOrder - orginLayer)
-- Util.AddParticleSortLayer(this.btnClickMove, self.sortingOrder - orginLayer)
Util.AddParticleSortLayer(this.sceneTran.gameObject, self.sortingOrder - orginLayer)
Util.AddParticleSortLayer(this.mountainTran.gameObject, self.sortingOrder - orginLayer)
Util.AddParticleSortLayer(Util.GetGameObject(this.decorateRoot, "effect"), self.sortingOrder - orginLayer)

View File

@ -61,7 +61,7 @@ function MainPlayerView.New(isSelf, root, rect, pos,_NpvData,sortingOrder)
instance.NpcGO = PlayerLiveView:New(instance.roleRootTran,2, PlayerLiveViewData,sortingOrder)
end
-- instance.NpcGO = PlayerLiveView:New(instance.roleRootTran,1, nil)
instance.NpcGO:SetNameHeight(1.5)
instance.NpcGO:SetNameHeight(3)
instance.NpcGO:OnOpen()
instance.NameText.text = PlayerManager.nickName
instance.rect = rect

View File

@ -222,7 +222,7 @@ function this.SingleRideClickShowInfo(data,go)
PopupTipPanel.ShowTip(Language[12317])
end)
elseif isGet and isUser then
NetManager.RequestChangeModifyDecoration(2,curPlayerHeadIconConfig.Id,function()
NetManager.RequestChangeModifyDecoration(2,0,function()
PlayerManager.SetPlayerDesignation(0)
this.ShowPanelData()
PlayerManager.SetisRefreshMainPanelNpc(true)

View File

@ -159,7 +159,7 @@ function PlayerLiveView:OnShowLive()
local curPlayerRole = ConfigManager.GetConfigData(ConfigName.PlayerRole,self.PlayerLiveViewData.designation)
local curArtResourcesConfig = ConfigManager.GetConfigData(ConfigName.ArtResourcesConfig,curPlayerRole.LiveAnimName)
local curLocalScale = Vector3.New(curArtResourcesConfig.Scale,curArtResourcesConfig.Scale,curArtResourcesConfig.Scale)
local y=curArtResourcesConfig.Position[2]+self.nameHeight
local y=curArtResourcesConfig.Position[2]+curPlayerRole.Height
if isRide then
y=y+3
end

View File

@ -1,6 +1,7 @@
PlayerTitle = {}
local this=PlayerTitle
local mapNpcOp = "PlayerTitle"
local isScaleActive = ServerConfigManager.IsSettingActive(ServerConfigManager.SettingConfig.IS_TITLE_EFFECT_SCALE)
function PlayerTitle:New(gameObject)
local b = {}
@ -74,8 +75,10 @@ function PlayerTitle:SetScale(scale)
end
function PlayerTitle:SetEffectScale(effectScale)
if self.titleLive then
Util.SetParticleScale(self.titleLive, effectScale)
if isScaleActive then
if self.titleLive then
Util.SetParticleScale(self.titleLive, effectScale)
end
end
end