GameSettingManager = GameSettingManager or BaseClass(EventDispatcher)
|
|
--屏蔽
|
|
GameSettingManager.BLOCK_SETTING_CHANGE = "BLOCK_SETTING_CHANGE"
|
|
|
|
-- 性能设置
|
|
GameSettingManager.PerformanceList = {
|
|
[1] =
|
|
{
|
|
title = "帧 率",
|
|
name_list = {"低","中","高"},
|
|
val_list = {40,45,50},
|
|
setting_str = "fps",
|
|
},
|
|
[2] =
|
|
{
|
|
title = "画 质",
|
|
name_list = {"低","中","高"},
|
|
val_list = {1,2,3},
|
|
setting_str = "quality"
|
|
},
|
|
}
|
|
|
|
-- 性能设置默认值
|
|
GameSettingManager.performanceSetDefualt = {
|
|
fps = 50,
|
|
quality = 3,
|
|
}
|
|
|
|
-- 基础设置默认值
|
|
GameSettingManager.basicDefualt = {
|
|
music = 50,
|
|
soundEffect = 100,
|
|
playerCounts = 15,
|
|
}
|
|
|
|
--挂机界面的设置默认值
|
|
GameSettingManager.autoSetDefualt = {
|
|
reborn = false,
|
|
flyShoe = false,
|
|
powerSave = true,
|
|
autoSwallow = false,
|
|
}
|
|
|
|
-- 等级分辨率比例
|
|
GameSettingManager.Resolution = {
|
|
[1] = 0.8,
|
|
[2] = 0.85,
|
|
[3] = 1,
|
|
}
|
|
|
|
--[[
|
|
other = 屏蔽所有玩家
|
|
monster = 屏蔽所有怪物
|
|
shadow = 屏蔽阴影效果
|
|
flower = 屏蔽礼物效果
|
|
chatVoice = 屏蔽语音自动
|
|
horse = 屏蔽他人座驾
|
|
wing = 屏蔽他人炫翼
|
|
talisman = 屏蔽他人宝具
|
|
godWeapon = 屏蔽他人神兵
|
|
aiNiang = 屏蔽他人AI娘
|
|
otherPtc = 屏蔽他人技能
|
|
baby = 屏蔽他人孩子
|
|
fashion = 屏蔽他人时装
|
|
title = 屏蔽他人称号
|
|
pet = 屏蔽他人宠物
|
|
--]]
|
|
GameSettingManager.blockDefualt = {
|
|
other = false,
|
|
monster = false,
|
|
shadow = false,
|
|
flower = false,
|
|
chatVoice = true,
|
|
|
|
horse = false,
|
|
wing = false,
|
|
talisman = true,
|
|
godWeapon = false,
|
|
aiNiang = true,
|
|
otherPtc = true,
|
|
baby = true,
|
|
fashion = false,
|
|
title = false,
|
|
pet = true,
|
|
}
|
|
|
|
--频道屏蔽语音
|
|
GameSettingManager.blockChannel = {
|
|
[1] = "world",
|
|
[3] = "area",
|
|
[4] = "guild",
|
|
[13] = "cross",
|
|
}
|
|
|
|
|
|
|
|
function GameSettingManager:__init()
|
|
GameSettingManager.Instance = self
|
|
|
|
self.blockSet = {}
|
|
self.sysSet = CookieWrapper.Instance:GetCookie(CookieLevelType.Common,CookieKey.SYSTEM_SETTING)
|
|
self.soundSet = CookieWrapper.Instance:GetCookie(CookieLevelType.Common,CookieKey.SOUND_SETTING)
|
|
self.temp_blockSet = {}
|
|
local performanceCfg = GameSettingManager.PerformanceList and GameSettingManager.PerformanceList[1].val_list or nil
|
|
|
|
--系统设置
|
|
if not self.sysSet then
|
|
local effectQuality = 2
|
|
local screenQuality = 3
|
|
local frameCount = 50
|
|
|
|
if SystemMemoryLevel.Cur == SystemMemoryLevel.Low then
|
|
effectQuality = 1
|
|
frameCount = performanceCfg and performanceCfg[SystemMemoryLevel.Low] or 40
|
|
elseif SystemMemoryLevel.Cur == SystemMemoryLevel.Middle then
|
|
effectQuality = 2
|
|
frameCount = performanceCfg and performanceCfg[SystemMemoryLevel.Middle] or 50
|
|
else
|
|
effectQuality = 3
|
|
frameCount = performanceCfg and performanceCfg[SystemMemoryLevel.Hight] or 60
|
|
end
|
|
|
|
self.sysSet = {quality = screenQuality, effect = effectQuality, fps = frameCount, playerCounts = 15,
|
|
reborn = false, flyShoe = false, powerSave = true, autoSwallow = false,
|
|
}
|
|
else
|
|
|
|
local frameCount = 50
|
|
if SystemMemoryLevel.Cur == SystemMemoryLevel.Low then
|
|
frameCount = performanceCfg and performanceCfg[SystemMemoryLevel.Low] or 40
|
|
elseif SystemMemoryLevel.Cur == SystemMemoryLevel.Middle then
|
|
frameCount = performanceCfg and performanceCfg[SystemMemoryLevel.Middle] or 50
|
|
else
|
|
frameCount = performanceCfg and performanceCfg[SystemMemoryLevel.Hight] or 60
|
|
end
|
|
|
|
if not self.sysSet.fps then self.sysSet.fps = frameCount end
|
|
if not self.sysSet.quality then self.sysSet.quality = 2 end
|
|
if not self.sysSet.powerSave then self.sysSet.powerSave = true end
|
|
if not self.sysSet.playerCounts then self.sysSet.playerCounts = 15 end
|
|
end
|
|
|
|
--音效设置
|
|
if not self.soundSet then
|
|
self.soundSet = {sound = Config.ConfigSound.TotalVloume, effectSound = Config.ConfigSound.TotalSoundEffect}
|
|
end
|
|
|
|
--屏蔽设置
|
|
local cookie_blockSet = CookieWrapper.Instance:GetCookie(CookieLevelType.Common,CookieKey.BLOCK_SETTING)
|
|
if not cookie_blockSet then
|
|
self.blockSet = GameSettingManager.blockDefualt
|
|
self:CheckPerformBlock()
|
|
else
|
|
--低端机没有选择权,按系统的来
|
|
if SystemMemoryLevel.Cur == SystemMemoryLevel.Low then
|
|
self.blockSet = GameSettingManager.blockDefualt
|
|
self:CheckPerformBlock()
|
|
else
|
|
self.blockSet = cookie_blockSet
|
|
end
|
|
end
|
|
|
|
-- 设置shaderlod
|
|
if SystemMemoryLevel.Cur == SystemMemoryLevel.Low then
|
|
Optimizer.SetShaderLodValue(200)
|
|
end
|
|
|
|
-- 设置界面动画开关
|
|
ClientConfig.view_ani_mode = false
|
|
ClientConfig.tabwin_ani_mode = false
|
|
if SystemMemoryLevel.Cur ~= SystemMemoryLevel.Low then
|
|
ClientConfig.view_ani_mode = true
|
|
ClientConfig.tabwin_ani_mode = true
|
|
end
|
|
end
|
|
|
|
--未手动设置过屏蔽信息的话,每次上线都根据设备等级校正一次屏蔽项
|
|
function GameSettingManager:CheckPerformBlock( )
|
|
if SystemMemoryLevel.Cur then
|
|
if SystemMemoryLevel.Cur == SystemMemoryLevel.Low then
|
|
self.sysSet.playerCounts = 15
|
|
self.sysSet.fps = 40
|
|
self.performanceSetDefualt["fps"] = 40
|
|
|
|
self.blockSet.other = false -- 屏蔽所有玩家
|
|
self.blockSet.monster = false -- 屏蔽所有怪物
|
|
self.blockSet.shadow = true -- 屏蔽动态阴影
|
|
self.blockSet.flower = true -- 屏蔽礼物效果
|
|
self.blockSet.chatVoice = true -- 屏蔽自动语音
|
|
self.blockSet.horse = false -- 屏蔽他人座驾
|
|
self.blockSet.wing = true -- 屏蔽他人炫翼
|
|
self.blockSet.talisman = true -- 屏蔽他人宝具
|
|
self.blockSet.godWeapon = true -- 屏蔽他人神兵
|
|
self.blockSet.aiNiang = true -- 屏蔽他人AI娘
|
|
self.blockSet.otherPtc = true -- 屏蔽他人技能
|
|
self.blockSet.baby = true -- 屏蔽他人宝宝
|
|
self.blockSet.fashion = false -- 屏蔽他人时装
|
|
self.blockSet.title = true -- 屏蔽他人称号
|
|
self.blockSet.pet = true -- 屏蔽他人宠物
|
|
|
|
elseif SystemMemoryLevel.Cur == SystemMemoryLevel.Middle then
|
|
self.sysSet.playerCounts = 15
|
|
self.sysSet.fps = 45
|
|
self.performanceSetDefualt["fps"] = 45
|
|
|
|
self.blockSet.other = false -- 屏蔽所有玩家
|
|
self.blockSet.monster = false -- 屏蔽所有怪物
|
|
self.blockSet.shadow = false -- 屏蔽动态阴影
|
|
self.blockSet.flower = false -- 屏蔽礼物效果
|
|
self.blockSet.chatVoice = true -- 屏蔽自动语音
|
|
self.blockSet.horse = false -- 屏蔽他人座驾
|
|
self.blockSet.wing = false -- 屏蔽他人炫翼
|
|
self.blockSet.talisman = true -- 屏蔽他人宝具
|
|
self.blockSet.godWeapon = false -- 屏蔽他人神兵
|
|
self.blockSet.aiNiang = true -- 屏蔽他人AI娘
|
|
self.blockSet.otherPtc = true -- 屏蔽他人技能
|
|
self.blockSet.baby = true -- 屏蔽他人宝宝
|
|
self.blockSet.fashion = false -- 屏蔽他人时装
|
|
self.blockSet.title = false -- 屏蔽他人称号
|
|
self.blockSet.pet = true -- 屏蔽他人宠物
|
|
|
|
elseif SystemMemoryLevel.Cur == SystemMemoryLevel.Hight then
|
|
self.sysSet.playerCounts = 20
|
|
self.sysSet.fps = 50
|
|
self.performanceSetDefualt["fps"] = 50
|
|
|
|
self.blockSet.other = false -- 屏蔽所有玩家
|
|
self.blockSet.monster = false -- 屏蔽所有怪物
|
|
self.blockSet.shadow = false -- 屏蔽动态阴影
|
|
self.blockSet.flower = false -- 屏蔽礼物效果
|
|
self.blockSet.chatVoice = true -- 屏蔽自动语音
|
|
self.blockSet.horse = false -- 屏蔽他人座驾
|
|
self.blockSet.wing = false -- 屏蔽他人炫翼
|
|
self.blockSet.talisman = true -- 屏蔽他人宝具
|
|
self.blockSet.godWeapon = false -- 屏蔽他人神兵
|
|
self.blockSet.aiNiang = true -- 屏蔽他人AI娘
|
|
self.blockSet.otherPtc = true -- 屏蔽他人技能
|
|
self.blockSet.baby = true -- 屏蔽他人宝宝
|
|
self.blockSet.fashion = false -- 屏蔽他人时装
|
|
self.blockSet.title = false -- 屏蔽他人称号
|
|
self.blockSet.pet = true -- 屏蔽他人宠物
|
|
end
|
|
end
|
|
end
|
|
|
|
function GameSettingManager:getInstance()
|
|
if GameSettingManager.Instance == nil then
|
|
GameSettingManager.New()
|
|
end
|
|
return GameSettingManager.Instance
|
|
end
|
|
|
|
function GameSettingManager:GetBasicDefualt(key)
|
|
return self.basicDefualt[key]
|
|
end
|
|
|
|
--挂机界面的默认自动设置
|
|
function GameSettingManager:GetAutoSetDefualt(key)
|
|
return self.autoSetDefualt[key]
|
|
end
|
|
|
|
function GameSettingManager:GetBlockDefualt(key)
|
|
return self.blockDefualt[key]
|
|
end
|
|
|
|
function GameSettingManager:GetPerformanceDefualt(key)
|
|
return self.performanceSetDefualt[key]
|
|
end
|
|
|
|
-- 还原屏蔽默认设置
|
|
function GameSettingManager:SetBlockDefualt()
|
|
self.blockSet = GameSettingManager.blockDefualt
|
|
self:SaveBlockSet()
|
|
end
|
|
|
|
|
|
function GameSettingManager:ApplySetting()
|
|
self:ApplyQualityLevel()
|
|
self:ApplyEffectLevel()
|
|
self:ApplyPlayerCounts()
|
|
self:ApplyFPSLevel()
|
|
self:ApplySceneEffect()
|
|
end
|
|
|
|
function GameSettingManager:SaveSoundSet()
|
|
CookieWrapper.Instance:SaveCookie(CookieLevelType.Common, CookieTimeType.TYPE_ALWAYS, CookieKey.SOUND_SETTING, self.soundSet)
|
|
end
|
|
|
|
function GameSettingManager:SaveSysSet()
|
|
CookieWrapper.Instance:SaveCookie(CookieLevelType.Common, CookieTimeType.TYPE_ALWAYS, CookieKey.SYSTEM_SETTING, self.sysSet)
|
|
CookieWrapper.Instance:WriteAll()
|
|
end
|
|
|
|
function GameSettingManager:SaveBlockSet()
|
|
CookieWrapper.Instance:SaveCookie(CookieLevelType.Common, CookieTimeType.TYPE_ALWAYS, CookieKey.BLOCK_SETTING, self.blockSet)
|
|
end
|
|
|
|
------挂机界面的自动设置----start
|
|
function GameSettingManager:GetAutoRebornSet()
|
|
return self.sysSet.reborn
|
|
end
|
|
|
|
function GameSettingManager:SetAutoRebornSet(state)
|
|
self.sysSet.reborn = state
|
|
self:SaveSysSet()
|
|
end
|
|
|
|
function GameSettingManager:GetAutoSwallowSet()
|
|
return self.sysSet.autoSwallow
|
|
end
|
|
|
|
function GameSettingManager:SetAutoSwallowSet(state)
|
|
self.sysSet.autoSwallow = state
|
|
self:SaveSysSet()
|
|
end
|
|
|
|
function GameSettingManager:GetAutoFlyShoeSet()
|
|
return self.sysSet.flyShoe
|
|
end
|
|
|
|
function GameSettingManager:SetAutoFlyShoeSet(state)
|
|
self.sysSet.flyShoe = state
|
|
self:SaveSysSet()
|
|
end
|
|
|
|
function GameSettingManager:GetAutoPowerSaveSet()
|
|
return self.sysSet.powerSave
|
|
end
|
|
|
|
function GameSettingManager:SetAutoPowerSaveSet(state)
|
|
self.sysSet.powerSave = state
|
|
self:SaveSysSet()
|
|
end
|
|
------挂机界面的自动设置----end
|
|
|
|
function GameSettingManager:SetSoundValue(value)
|
|
self.soundSet.sound = value
|
|
self:SaveSoundSet()
|
|
end
|
|
|
|
function GameSettingManager:SetEffectSoundValue(value)
|
|
self.soundSet.effectSound = value
|
|
self:SaveSoundSet()
|
|
end
|
|
|
|
|
|
function GameSettingManager:GetQualityLevel()
|
|
-- if self.sysSet.powerSave then
|
|
-- return self.powerSet.quality
|
|
-- else
|
|
return self.sysSet.quality
|
|
-- end
|
|
end
|
|
|
|
--设置屏幕分辨率
|
|
function GameSettingManager:SetResolution(level)
|
|
if RuntimePlatform then
|
|
if SystemRuntimePlatform.IsAndroid() or SystemRuntimePlatform.IsIphone() then --or ClientConfig.iphone_x_model then
|
|
local scale = GameSettingManager.Resolution[level] or 1
|
|
if OriginalResolutionWidth < 1500 then
|
|
scale = 1 --1500以下就不要缩放了
|
|
end
|
|
if scale >= 1 and OriginalResolutionWidth > 2500 then
|
|
scale = 2340/OriginalResolutionWidth
|
|
end
|
|
ResolutionWidth = math.floor(OriginalResolutionWidth * scale)
|
|
ResolutionHeight = math.floor(OriginalResolutionHeight * scale)
|
|
UnityEngine.Screen.SetResolution(ResolutionWidth, ResolutionHeight, true)
|
|
ScreenConvertRatio = math.min(ResolutionWidth / OriginalScreenWidth,ResolutionHeight / OriginalScreenHeight)
|
|
ScreenWidth = ResolutionWidth / ScreenConvertRatio --游戏中的屏幕逻辑像素宽度 也就是所谓的视口坐标 用来逻辑运算用的
|
|
ScreenHeight = ResolutionHeight / ScreenConvertRatio --游戏中的屏幕逻辑像素高度 也就是所谓的视口坐标 用来逻辑运算用的
|
|
if SystemRuntimePlatform.IsIphone() then
|
|
CheckIphoneXState()
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
function GameSettingManager:SetQualityLevel(level)
|
|
if self.sysSet.quality and self.sysSet.quality == level then
|
|
return
|
|
end
|
|
self.sysSet.quality = level
|
|
self:ApplyQualityLevel()
|
|
self:SaveSysSet()
|
|
GlobalEventSystem:Fire(GameSettingEvent.ON_QUALITY_SETTING_CHANGE, level)
|
|
end
|
|
|
|
function GameSettingManager:ApplyQualityLevel(level)
|
|
local level = level or self.sysSet.quality
|
|
QualitySettings.SetQualityLevel(level - 1, false)
|
|
self:SetResolution(level)
|
|
end
|
|
|
|
--切换画质的时候手动修改后处理效果,进入游戏之后才能调用
|
|
function GameSettingManager:SetPostEffectLevel( level )
|
|
local level = level or self.sysSet.quality
|
|
if not MainCamera then
|
|
return
|
|
end
|
|
--后处理设定,画质:1低 2中 3高
|
|
print("tanar: [GameSettingManager 387]=> level: ",level)
|
|
if level == 3 then
|
|
-- 主摄像机
|
|
local is_support_main_effect = MainCamera:getInstance():IsSupportPostEffect()
|
|
if is_support_main_effect then
|
|
if MainCamera:getInstance().main_postEffect then
|
|
MainCamera:getInstance().main_postEffect.enabled = true
|
|
end
|
|
end
|
|
-- 模型摄像机泛光
|
|
local is_support_ui_effect = lua_viewM:IsSupportUIEffect()
|
|
if is_support_ui_effect then
|
|
if lua_viewM.bloom_effect then
|
|
lua_viewM.bloom_effect.enabled = true
|
|
-- 抗锯齿
|
|
-- if lua_viewM:IsSupportUIEffect() then
|
|
-- lua_viewM.bloom_effect.EnableFXAA = true
|
|
-- lua_viewM.bloom_effect.subpixelBlending = 0.4
|
|
-- lua_viewM.bloom_effect.lowQuality = true
|
|
-- lua_viewM.bloom_effect:ApplyFXAAMaterialProperties()
|
|
-- else
|
|
lua_viewM.bloom_effect.EnableFXAA = false
|
|
-- end
|
|
end
|
|
end
|
|
elseif level == 2 then
|
|
-- 主摄像机
|
|
if MainCamera:getInstance().main_postEffect then
|
|
MainCamera:getInstance().main_postEffect.enabled = false
|
|
end
|
|
-- 模型摄像机泛光
|
|
local is_support_ui_effect = lua_viewM:IsSupportUIEffect()
|
|
if is_support_ui_effect then
|
|
if lua_viewM.bloom_effect then
|
|
lua_viewM.bloom_effect.enabled = true
|
|
-- 抗锯齿
|
|
lua_viewM.bloom_effect.EnableFXAA = false
|
|
-- lua_viewM.bloom_effect:ApplyFXAAMaterialProperties()
|
|
end
|
|
end
|
|
elseif level == 1 then
|
|
if MainCamera:getInstance().main_postEffect then
|
|
MainCamera:getInstance().main_postEffect.enabled = false
|
|
end
|
|
if lua_viewM.bloom_effect then
|
|
lua_viewM.bloom_effect.enabled = false
|
|
end
|
|
end
|
|
end
|
|
|
|
function GameSettingManager:GetEffectLevel()
|
|
return self.sysSet.effect
|
|
end
|
|
|
|
function GameSettingManager:SetEffectLevel(level)
|
|
self.sysSet.effect = level
|
|
self:SaveSysSet()
|
|
self:ApplyEffectLevel()
|
|
end
|
|
|
|
function GameSettingManager:ApplyEffectLevel(level)
|
|
end
|
|
|
|
function GameSettingManager:ApplySceneEffect()
|
|
-- if MapView and MapView.Instance then
|
|
-- MapView.Instance:RefreshEffect()
|
|
-- end
|
|
end
|
|
|
|
function GameSettingManager:GetFPSLevel()
|
|
return self.sysSet.fps
|
|
end
|
|
|
|
function GameSettingManager:SetSceneEffect(state )
|
|
if MapView and MapView.Instance then
|
|
MapView.Instance:SetHideRefreshEffect(state)
|
|
end
|
|
end
|
|
|
|
function GameSettingManager:ApplyFPSLevel()
|
|
FINAL_FRAMERATE = self.sysSet.fps or FINAL_FRAMERATE
|
|
SetGameFrameRate(FINAL_FRAMERATE)
|
|
end
|
|
|
|
function GameSettingManager:GetPlayerCounts()
|
|
return self.sysSet.playerCounts
|
|
end
|
|
|
|
function GameSettingManager:SetPlayerCounts(number)
|
|
self.sysSet.playerCounts = number
|
|
self:SaveSysSet()
|
|
end
|
|
|
|
function GameSettingManager:ApplyPlayerCounts()
|
|
GlobalEventSystem:Fire(SceneEventType.UPDATE_ROLE_LIMIT)
|
|
end
|
|
|
|
function GameSettingManager:ApplyMonsterVisibleState()
|
|
if self:GetBlockProperty("monster") then
|
|
GlobalEventSystem:Fire(SceneEventType.HIDE_ALL_MONSTER)
|
|
else
|
|
GlobalEventSystem:Fire(SceneEventType.SHOW_ALL_MONSTER)
|
|
end
|
|
end
|
|
|
|
function GameSettingManager:EnableEffectSound(state)
|
|
self.sysSet.effectSound = state
|
|
self:SaveSysSet()
|
|
lua_soundM:SwitchEffectState(state)
|
|
end
|
|
|
|
function GameSettingManager:EnableMusicSound(state)
|
|
self.sysSet.musicSound = state
|
|
self:SaveSysSet()
|
|
lua_soundM:SwitchMusicState(state)
|
|
end
|
|
|
|
function GameSettingManager:EnablePowerSave(state)
|
|
self.sysSet.powerSave = state
|
|
self:SaveSysSet()
|
|
end
|
|
|
|
function GameSettingManager:GetTargetPriority()
|
|
return 2
|
|
end
|
|
|
|
function GameSettingManager:GetBlockProperty(key)
|
|
if SceneManager.Instance:IsPkRankFightScene() then
|
|
return false
|
|
end
|
|
return self.blockSet[key]
|
|
end
|
|
|
|
function GameSettingManager:SetBlockProperty(key, value)
|
|
if self.blockSet[key] and self.blockSet[key] == value then return end
|
|
self.blockSet[key] = value
|
|
self:SaveBlockSet()
|
|
|
|
self:Fire(GameSettingManager.BLOCK_SETTING_CHANGE, key, value)
|
|
end
|
|
|
|
|
|
-- performance的cookie也存在sysSet里面
|
|
function GameSettingManager:GetPerformanceProperty(key)
|
|
return self.sysSet[key]
|
|
end
|
|
|
|
function GameSettingManager:SetPerformanceProperty(key, value)
|
|
if self.sysSet[key] and self.sysSet[key] == value then return end
|
|
self.sysSet[key] = value
|
|
self:SaveSysSet()
|
|
if key == "quality" then
|
|
self:SetQualityLevel(value)
|
|
elseif key == "fps" then
|
|
self:ApplyFPSLevel()
|
|
end
|
|
end
|
|
|
|
--临时设置屏蔽标识
|
|
function GameSettingManager:SetBlockPropertyTemp(key, value)
|
|
if (self.blockSet[key] and self.blockSet[key] == value) or (self.temp_blockSet[key] and self.temp_blockSet[key] == value) then return end
|
|
self.temp_blockSet[key] = value
|
|
self:Fire(GameSettingManager.BLOCK_SETTING_CHANGE, key, value)
|
|
end
|
|
|
|
--获得是否存在标识
|
|
function GameSettingManager:ExistBlockSet(key)
|
|
return self.blockSet[key] or self.temp_blockSet[key]
|
|
end
|
|
|
|
|
|
--是否屏蔽特效副本场景
|
|
function GameSettingManager:NotBlockEffecScene(sceneId)
|
|
--以下玩法需要根据内存情况 判断是否默认开启特效
|
|
if SceneManager:getInstance():IsLeagueWarScene(sceneId) or SceneManager:getInstance():IsCSPvP(sceneId) or SceneManager:getInstance():IsPkBattleScene(sceneId) then
|
|
if SystemMemoryLevel.Cur == SystemMemoryLevel.Hight then
|
|
return true
|
|
else
|
|
return false
|
|
end
|
|
end
|
|
if SceneManager:getInstance():IsDiamondFightScene(sceneId) or SceneManager:getInstance():IsTopPkScene(sceneId) then
|
|
return true
|
|
end
|
|
return false
|
|
end
|
|
|
|
--获得帧率上限
|
|
function GameSettingManager:GetFrameRate( )
|
|
return self.sysSet.frameRate or 60
|
|
end
|