【特权优化】将界面顶部的特权等级移回-挂机,副本界面修啊给i

dev_chengFeng
gaoxin 2021-03-30 19:54:19 +08:00
parent cfaeff6759
commit c2a5c2dc17
6 changed files with 41 additions and 13488 deletions

View File

@ -5844,6 +5844,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1410886060457754308}
- {fileID: 5801319164494139603}
m_Father: {fileID: 6847745749794772469}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -6146,7 +6147,6 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 2844167576605455372}
- {fileID: 5801319164494139603}
m_Father: {fileID: 6855514544870948464}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -6559,11 +6559,11 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8488004882552802164}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 6847745749794772469}
m_Father: {fileID: 2844167576605455372}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}

View File

@ -136,22 +136,10 @@ function CarbonTypePanelV2:InitComponent()
this.zonghe = Util.GetGameObject(self.gameObject, "BgRoot/GameObject")
this.backBtn = Util.GetGameObject(self.gameObject, "backBtn")
--头像、战力
this.level = Util.GetGameObject(this.zonghe, "LeftUp/headBox/lvFrame/lv"):GetComponent("Text")
this.playName = Util.GetGameObject(this.zonghe, "LeftUp/headBox/name"):GetComponent("Text")
this.expSliderValue = Util.GetGameObject(this.zonghe, "LeftUp/headBox/exp"):GetComponent("Slider")
this.expSliderValue.transform.localScale = Vector3.New(UIManager.adapterScale, 1, 1)
this.headBox = Util.GetGameObject(this.zonghe, "LeftUp/headBox")
this.headPos = Util.GetGameObject(this.zonghe, "LeftUp/headBox/headpos")
this.headRedpot = Util.GetGameObject(this.zonghe, "LeftUp/headBox/redpot")
this.teamPower = Util.GetGameObject(this.zonghe, "LeftUp/powerBtn/value"):GetComponent("Text")
-- 特权
this.vipPrivilegeBtn = Util.GetGameObject(this.zonghe, "LeftUp/vipPrivilege/vipPrivilegeBtn")
this.vipLevelText = Util.GetGameObject(this.vipPrivilegeBtn, "bg/vip"):GetComponent("Image")
this.vipRedPoint = Util.GetGameObject(this.zonghe, "LeftUp/vipPrivilege/redPoint")
screenAdapte(this.vipPrivilegeBtn)
if not this.playerInfoView then
this.playerInfoView = SubUIManager.Open(SubUIConfig.PlayerInfoView, this.zonghe.transform)
end
this.AnimRoot = Util.GetGameObject(self.gameObject, "btnRoot/circle/root")
@ -164,7 +152,6 @@ end
local index = 1
--绑定事件(用于子类重写)
function CarbonTypePanelV2:BindEvent()
BindRedPointObject(RedPointType.VipPrivilege, this.vipRedPoint)
Util.AddClick(
this.backBtn,
function()
@ -173,22 +160,6 @@ function CarbonTypePanelV2:BindEvent()
end
)
-- 点击你的猪头
Util.AddClick(
this.headBox,
function()
UIManager.OpenPanel(UIName.SettingPanel)
end
)
BindRedPointObject(RedPointType.Setting, this.headRedpot)
Util.AddClick(
this.vipPrivilegeBtn,
function()
UIManager.OpenPanel(UIName.VipPanelV2)
end
)
end
--添加事件监听(用于子类重写)
@ -260,16 +231,12 @@ function CarbonTypePanelV2:OnShow(...)
if carbonType == 1 then
this.zonghe.gameObject:SetActive(true)
this.backBtn.gameObject:SetActive(false)
this.FreshPlayerInfo()
this.SetPlayerHead()
elseif carbonType == 2 then
this.zonghe.gameObject:SetActive(false)
this.backBtn.gameObject:SetActive(true)
else
this.zonghe.gameObject:SetActive(true)
this.backBtn.gameObject:SetActive(false)
this.FreshPlayerInfo()
this.SetPlayerHead()
end
this.UpdateCarbonContent()
@ -436,32 +403,9 @@ function this.BtnClick(id)
end
-- 刷新玩家信息显示
function this.FreshPlayerInfo()
this.vipLevelText.sprite = VipManager.SetVipLevelImg()
this.level.text = PlayerManager.level
this.expSliderValue.value = PlayerManager.exp / PlayerManager.userLevelData[PlayerManager.level].Exp
this.playName.text = PlayerManager.nickName
this.teamPower.text = FormationManager.GetFormationPower(FormationManager.curFormationIndex)
end
-- 设置头像
function this.SetPlayerHead()
if not this.playerHead then
this.playerHead = SubUIManager.Open(SubUIConfig.PlayerHeadView, this.headPos.transform)
end
this.playerHead:SetHead(PlayerManager.head)
this.playerHead:SetFrame(HeadManager.GetCurFrameId())
this.playerHead:SetScale(Vector3.one * 0.9)
this.playerHead:SetPosition(Vector3.New(-5, 8, 0))
this.playerHead:SetLayer(this.sortingOrder)
this.playerHead:SetEffectScale(0.85)
end
function this:OnSortingOrderChange()
Util.AddParticleSortLayer(this.effect, self.sortingOrder - orginLayer)
Util.AddParticleSortLayer(this.wind, self.sortingOrder - orginLayer)
Util.AddParticleSortLayer(this.vipPrivilegeBtn, self.sortingOrder - orginLayer)
orginLayer = self.sortingOrder
if carbonType == 1 then
@ -472,8 +416,8 @@ function this:OnSortingOrderChange()
else
end
-- 头像层级
if this.playerHead then
this.playerHead:SetLayer(self.sortingOrder)
if this.playerInfoView then
this.playerInfoView:SetLayer(self.sortingOrder)
end
end
@ -528,16 +472,14 @@ function CarbonTypePanelV2:OnDestroy()
SubUIManager.Close(this.BtView)
end
carbons = {}
if this.playerHead then
SubUIManager.Close(this.playerHead)
if this.playerInfoView then
SubUIManager.Close(this.playerInfoView)
this.playerInfoView = nil
end
SubUIManager.Close(this.UpView)
this.playerHead = nil
this.UpView = nil
this.BtView = nil
ClearRedPointObject(RedPointType.Setting, this.headRedpot)
-- for k,v in ipairs(carbons) do
-- local data
-- if not type[PlayerManager.carbonType][k] then

View File

@ -60,16 +60,6 @@ function FightPointPassMainPanel:InitComponent()
fightMap:InitComponent(self.gameObject, this)
isAnimActive = false
--头像、战力
this.level = Util.GetGameObject(self.gameObject, "Bg/LeftUp/headBox/lvFrame/lv"):GetComponent("Text")
this.playName = Util.GetGameObject(self.gameObject, "Bg/LeftUp/headBox/name"):GetComponent("Text")
this.expSliderValue = Util.GetGameObject(self.gameObject, "Bg/LeftUp/headBox/exp"):GetComponent("Slider")
this.expSliderValue.transform.localScale = Vector3.New(UIManager.adapterScale, 1, 1)
this.headBox = Util.GetGameObject(self.gameObject, "Bg/LeftUp/headBox")
this.headPos = Util.GetGameObject(self.gameObject, "Bg/LeftUp/headBox/headpos")
this.headRedpot = Util.GetGameObject(self.gameObject, "Bg/LeftUp/headBox/redpot")
this.teamPower = Util.GetGameObject(self.gameObject, "Bg/LeftUp/powerBtn/value"):GetComponent("Text")
-- 通关豪礼入口
this.pgBtn=Util.GetGameObject(self.gameObject,"LeftUp/box/passGift")
this.pgFrame=Util.GetGameObject(this.pgBtn,"frame"):GetComponent("Image")
@ -112,6 +102,11 @@ function FightPointPassMainPanel:InitComponent()
LanguageFontSizeFilter(this.fightText, 50)
-- 你要变强
this.btnGetForce = Util.GetGameObject(self.gameObject, "Bg/btnDown/btnIWantMilk")
if not this.playerInfoView then
this.playerInfoView = SubUIManager.Open(SubUIConfig.PlayerInfoView, this.transform)
end
this.BtView = SubUIManager.Open(SubUIConfig.BtView, self.gameObject.transform)
this.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform)
@ -217,12 +212,6 @@ function FightPointPassMainPanel:InitComponent()
this.openFunNeedInfo = Util.GetGameObject(self.gameObject, "Bg/RightUpVertical/openFun/needInfo"):GetComponent("Text")
this.openFunFunInfo = Util.GetGameObject(self.gameObject, "Bg/RightUpVertical/openFun/funInfo"):GetComponent("Text")
-- 特权
this.vipPrivilegeBtn = Util.GetGameObject(self.gameObject, "Bg/LeftUp/vipPrivilege/vipPrivilegeBtn")
this.vipLevelText = Util.GetGameObject(this.vipPrivilegeBtn, "bg/vip"):GetComponent("Image")
this.vipRedPoint = Util.GetGameObject(self.gameObject, "Bg/LeftUp/vipPrivilege/redPoint")
screenAdapte(this.vipPrivilegeBtn)
-- 开服福利
this.UI_Effect_MuBiaoJiangLi = Util.GetGameObject(self.gameObject, "Bg/LeftUp/box/btnOpenSeverWelfare/UI_Effect_MuBiaoJiangLi")
this.btnOpenSeverWelfare = Util.GetGameObject(self.gameObject, "Bg/LeftUp/box/btnOpenSeverWelfare")
@ -280,15 +269,6 @@ function FightPointPassMainPanel:BindEvent()
end
end)
Util.AddClick(this.headBox, function ()
UIManager.OpenPanel(UIName.SettingPanel)
end)
--特权
Util.AddClick(this.vipPrivilegeBtn, function()
UIManager.OpenPanel(UIName.VipPanelV2)
end)
--通关豪礼
Util.AddClick(this.pgBtn,function()
FightPointPassManager.isBeginFight = true
@ -306,16 +286,10 @@ function FightPointPassMainPanel:BindEvent()
Util.AddClick(this.btnXiaoYao,function()
XiaoYaoManager.OpenMapList()
end)
Util.AddClick(this.vipPrivilegeBtn, function()
UIManager.OpenPanel(UIName.VipPanelV2)
end)
Util.AddClick(this.btnOpenSeverWelfare, function()
UIManager.OpenPanel(UIName.OpenSeverWelfarePanel)
end)
BindRedPointObject(RedPointType.DailyTaskMain, this.dailyRedPoint)
BindRedPointObject(RedPointType.Setting, this.headRedpot)
BindRedPointObject(RedPointType.VipPrivilege, this.vipRedPoint)
BindRedPointObject(RedPointType.SecretTer_IsCanFight, this.fightRP)
BindRedPointObject(RedPointType.XiaoYaoYouRedPoint, this.xiaoyaoRedPoint)
end
@ -347,7 +321,6 @@ function FightPointPassMainPanel:AddListener()
invadeMonster:AddListener()
fightMap:AddListener()
Game.GlobalEvent:AddEvent(GameEvent.Player.OnPlayerLvChange, this.FreshPlayerInfo)
Game.GlobalEvent:AddEvent(GameEvent.FunctionCtrl.OnFunctionOpen, this.BtnsIsOpen)
Game.GlobalEvent:AddEvent(GameEvent.Bag.BagGold, this.UpdateFindTreasureMaterialNum)
Game.GlobalEvent:AddEvent(GameEvent.FindTreasure.RefreshFindTreasureRedPot, this.RefreshFindTreasureRedPoint)
@ -360,7 +333,6 @@ function FightPointPassMainPanel:RemoveListener()
invadeMonster:RemoveListener()
fightMap:RemoveListener()
Game.GlobalEvent:RemoveEvent(GameEvent.Player.OnPlayerLvChange, this.FreshPlayerInfo)
Game.GlobalEvent:RemoveEvent(GameEvent.FunctionCtrl.OnFunctionOpen, this.BtnsIsOpen)
Game.GlobalEvent:RemoveEvent(GameEvent.Bag.BagGold, this.UpdateFindTreasureMaterialNum)
Game.GlobalEvent:RemoveEvent(GameEvent.FindTreasure.RefreshFindTreasureRedPot, this.RefreshFindTre3asureRedPoint)
@ -411,8 +383,6 @@ function FightPointPassMainPanel:OnShow()
end
this.chapterName.text = GetLanguageStrById(fightLevelSetConfig[chapterId].Name)
this.FreshPlayerInfo()
this.InitShow()
-- 奖励预览
this.IntiReward()
@ -424,7 +394,6 @@ function FightPointPassMainPanel:OnShow()
hasLoad = true
this:Update()
this.FreshVip()
if callBack then
callBack()
@ -495,11 +464,6 @@ function this:Update()
end
end
-- 刷新特权显示
function this.FreshVip()
this.vipLevelText.sprite = VipManager.SetVipLevelImg()
end
--按钮开启限制
function this.BtnsIsOpen()
for i, v in pairs(this.funcBtnList) do
@ -509,20 +473,6 @@ function this.BtnsIsOpen()
this.btnRank.gameObject:SetActive(ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.ALLRANKING))
end
function this.InitShow()
if not this.playerHead then
this.playerHead = SubUIManager.Open(SubUIConfig.PlayerHeadView, this.headPos.transform)
end
this.playerHead:SetHead(PlayerManager.head)
this.playerHead:SetFrame(HeadManager.GetCurFrameId())
this.playerHead:SetScale(Vector3.one * 0.9)
this.playerHead:SetPosition(Vector3.New(-5, 8, 0))
this.playerHead:SetLayer(this.sortingOrder)
this.playerHead:SetEffectScale(0.85)
end
function this.IntiReward()
local rewardData
if FightPointPassManager.isOpenNewChapter then
@ -551,16 +501,6 @@ function this.IntiReward()
end
end
-- 刷新玩家信息显示
function this.FreshPlayerInfo()
this.level.text = PlayerManager.level
this.expSliderValue.value = PlayerManager.exp / PlayerManager.userLevelData[PlayerManager.level].Exp
this.playName.text = PlayerManager.nickName
this.teamPower.text = FormationManager.GetFormationPower(FormationManager.curFormationIndex)
this.SetFightBtnText()
end
--刷新通关豪礼主界面显示
function this.RefreshPassGiftShow()
local mainLevelEndId=ConfigManager.TryGetConfigDataByKey(ConfigName.MainLevelConfig,"NextLevel",-1).Id--最高关卡
@ -646,7 +586,6 @@ function FightPointPassMainPanel:OnSortingOrderChange()
Util.AddParticleSortLayer(this.GuideEffectGo, self.sortingOrder - orginLayer)
Util.AddParticleSortLayer(this.GuideJumpEffectGo, self.sortingOrder - orginLayer)
Util.AddParticleSortLayer(this.pgEffect, self.sortingOrder - orginLayer)
Util.AddParticleSortLayer(this.vipPrivilegeBtn, self.sortingOrder - orginLayer)
Util.AddParticleSortLayer(this.UI_Effect_MuBiaoJiangLi, self.sortingOrder - orginLayer)
fightMap:OnSortingOrderChange(self.sortingOrder)
@ -654,8 +593,8 @@ function FightPointPassMainPanel:OnSortingOrderChange()
this.BtView:SetOrderStatus({ sortOrder = self.sortingOrder })
-- 头像层级
if this.playerHead then
this.playerHead:SetLayer(self.sortingOrder)
if this.playerInfoView then
this.playerInfoView:SetLayer(self.sortingOrder)
end
end
@ -694,10 +633,14 @@ function FightPointPassMainPanel:OnDestroy()
SubUIManager.Close(this.UpView)
SubUIManager.Close(this.BtView)
ClearRedPointObject(RedPointType.DailyTaskMain, this.DailyRedPoint)
ClearRedPointObject(RedPointType.Setting, this.headRedpot)
ClearRedPointObject(RedPointType.VipPrivilege, this.vipRedPoint)
ClearRedPointObject(RedPointType.SecretTer_IsCanFight, this.fightRP)
ClearRedPointObject(RedPointType.XiaoYaoYouRedPoint, this.xiaoyaoRedPoint)
-- 头像层级
if this.playerInfoView then
SubUIManager.Close(this.playerInfoView)
this.playerInfoView = nil
end
end
--跳转显示新手提示圈
function FightPointPassMainPanel.ShowGuideGo(btnIndex)

View File

@ -28,7 +28,7 @@ function PlayerInfoView:InitComponent()
-- 特权
self.vipPrivilegeBtn = Util.GetGameObject(self.gameObject, "vipPrivilege/vipPrivilegeBtn")
self.vipLevelText = Util.GetGameObject(self.vipPrivilegeBtn, "bg/vip"):GetComponent("Image")
self.vipRedPoint = Util.GetGameObject(self.gameObject, "vipPrivilege/redPoint")
self.vipRedPoint = Util.GetGameObject(self.gameObject, "vipPrivilege/vipPrivilegeBtn/redPoint")
screenAdapte(self.vipPrivilegeBtn)
end