【称号】称号特效显示兼容处理

dev_chengFeng
gaoxin 2021-06-18 11:31:49 +08:00
parent 74c5cd04c4
commit 21875c589f
1 changed files with 14 additions and 4 deletions

View File

@ -1,8 +1,7 @@
PlayerTitle = {}
local this=PlayerTitle
local mapNpcOp = "PlayerTitle"
local isScaleActive = ServerConfigManager.IsSettingActive(ServerConfigManager.SettingConfig.IS_TITLE_EFFECT_SCALE)
local settingValue = ServerConfigManager.GetSettingValue(ServerConfigManager.SettingConfig.IS_TITLE_EFFECT_SCALE)
function PlayerTitle:New(gameObject)
local b = {}
b.gameObject = gameObject
@ -86,8 +85,19 @@ end
function PlayerTitle:SetEffectScale(effectScale)
if self.titleLive then
Util.SetParticleScale(self.titleLive, effectScale)
-- 老包称号显示优化
if not isScaleActive then
local isScaleActive = true
-- 处理喜扑老包称号显示异常的问题,喜扑第一个版本的包在底层删除了缩放节点,这里要处理下针对此包不再进行缩放还原
if AppConst.isSDK then
local vc = AndroidDeviceInfo.Instance:GetVersionCode()
if settingValue and vc == Androidtonumber(settingValue) then
isScaleActive = false
end
end
-- 称号显示优化,设置粒子缩放会导致节点缩放,导致粒子显示异常,这里要将缩放还原
if isScaleActive then
local particles = self.titleLive:GetComponentsInChildren(typeof(UnityEngine.ParticleSystem))
local isScale = false
for key, value in pairs(particles:ToTable()) do