Merge branch 'china/dev' into 0活动开发聚集地/福星高照
commit
62a064b33e
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -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}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -173,7 +173,10 @@ function this.SetRoleWalk(middleFightId)
|
|||
local pos = Vector3.New(oldMainLevelSettingConfig.ChapterRolePosition[1]+30, oldMainLevelSettingConfig.ChapterRolePosition[2]-100,100)
|
||||
local targetPos = tagerPos
|
||||
local speed = 5 -- 越大越慢
|
||||
|
||||
if this.liveNode == nil then
|
||||
this.liveNode = PlayerLiveView:New(Util.GetTransform(root, "mapParent/selectMap/Image (1)/roleRoot"),1)
|
||||
this.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale5,Vector3.New(0,40,0),WALK_DIR.IDLE_FRONT)
|
||||
end
|
||||
this.liveNode.leader.transform:DOLocalMove(targetPos, speed / 5, false):OnStart(function ()
|
||||
this.SetRoleDirAction(targetPos.x, targetPos.y, pos.x, pos.y)
|
||||
end):OnUpdate(function() --TODO:测试速度
|
||||
|
|
|
|||
|
|
@ -111,21 +111,10 @@ function GuildMainCityPanel:InitComponent()
|
|||
this.btnResult = Util.GetGameObject(this.rightBox, "result")
|
||||
this.btnRedPacket=Util.GetGameObject(this.rightBox,"redPacket")
|
||||
this.btnRedPacketRedPoint=Util.GetGameObject(this.btnRedPacket,"redPoint")
|
||||
-- 嚣张的头像
|
||||
this.level = Util.GetGameObject(self.gameObject, "LeftUp/headBox/lvFrame/lv"):GetComponent("Text")
|
||||
this.playName = Util.GetGameObject(self.gameObject, "LeftUp/headBox/name"):GetComponent("Text")
|
||||
this.expSliderValue = Util.GetGameObject(self.gameObject, "LeftUp/headBox/exp"):GetComponent("Slider")
|
||||
this.expSliderValue.transform.localScale = Vector3.New(UIManager.adapterScale, 1, 1)
|
||||
|
||||
this.headBox = Util.GetGameObject(self.gameObject, "LeftUp/headBox")
|
||||
this.headPos = Util.GetGameObject(self.gameObject, "LeftUp/headBox/headpos")
|
||||
this.headRedpot = Util.GetGameObject(self.gameObject, "LeftUp/headBox/redpot")
|
||||
this.teamPower = Util.GetGameObject(self.gameObject, "LeftUp/powerBtn/value"):GetComponent("Text")
|
||||
-- 特权
|
||||
this.vipPrivilegeBtn = Util.GetGameObject(self.gameObject, "LeftUp/vipPrivilege/vipPrivilegeBtn")
|
||||
this.vipLevelText = Util.GetGameObject(this.vipPrivilegeBtn, "bg/vip"):GetComponent("Image")
|
||||
this.vipRedPoint = Util.GetGameObject(self.gameObject, "LeftUp/vipPrivilege/redPoint")
|
||||
screenAdapte(this.vipPrivilegeBtn)
|
||||
if not this.playerInfoView then
|
||||
this.playerInfoView = SubUIManager.Open(SubUIConfig.PlayerInfoView, this.transform)
|
||||
end
|
||||
-- 聊天
|
||||
this.ChatTipView = SubUIManager.Open(SubUIConfig.ChatTipView, self.transform, 2)
|
||||
this.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform, { showType = UpViewOpenType.ShowLeft })
|
||||
|
|
@ -222,19 +211,8 @@ function GuildMainCityPanel:BindEvent()
|
|||
UIManager.OpenPanel(UIName.RedPacketPanel)
|
||||
end)
|
||||
|
||||
-- 点击你的猪头
|
||||
Util.AddClick(this.headBox, function ()
|
||||
UIManager.OpenPanel(UIName.SettingPanel)
|
||||
end)
|
||||
|
||||
Util.AddClick(this.vipPrivilegeBtn, function()
|
||||
UIManager.OpenPanel(UIName.VipPanelV2)
|
||||
end)
|
||||
|
||||
-- 绑定红点
|
||||
BindRedPointObject(RedPointType.Guild_RedPacket, this.btnRedPacketRedPoint)
|
||||
BindRedPointObject(RedPointType.Setting, this.headRedpot)
|
||||
BindRedPointObject(RedPointType.VipPrivilege, this.vipRedPoint)
|
||||
end
|
||||
|
||||
--添加事件监听(用于子类重写)
|
||||
|
|
@ -249,7 +227,6 @@ function GuildMainCityPanel:AddListener()
|
|||
Game.GlobalEvent:AddEvent(GameEvent.GuildFight.AttackStageDefendDataUpdate, this.RefreshGetStar)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.GuildRedPacket.OnCloseRedPointClick, this.CloseRedPointClick)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Guild.RefreshDeathPosStatus, this.RefreshDeathPos)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Player.OnChangeName, this.FreshPlayerInfo)
|
||||
end
|
||||
|
||||
--移除事件监听(用于子类重写)
|
||||
|
|
@ -264,7 +241,6 @@ function GuildMainCityPanel:RemoveListener()
|
|||
Game.GlobalEvent:RemoveEvent(GameEvent.GuildFight.AttackStageDefendDataUpdate, this.RefreshGetStar)
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.GuildRedPacket.OnCloseRedPointClick, this.CloseRedPointClick)
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.Guild.RefreshDeathPosStatus, this.RefreshDeathPos)
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.Player.OnChangeName, this.FreshPlayerInfo)
|
||||
end
|
||||
|
||||
--界面打开时调用(用于子类重写)
|
||||
|
|
@ -301,8 +277,6 @@ function GuildMainCityPanel:OnShow()
|
|||
this._TimeCounter = Timer.New(this._TimeUpdate, 1, -1, true)
|
||||
this._TimeCounter:Start()
|
||||
end
|
||||
this.FreshPlayerInfo()
|
||||
this.SetPlayerHead()
|
||||
|
||||
if not RECHARGEABLE then--(是否开启充值)
|
||||
this.btnRedPacket:SetActive(false)
|
||||
|
|
@ -315,34 +289,13 @@ function GuildMainCityPanel:OnShow()
|
|||
end
|
||||
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()
|
||||
if this.playerHead then
|
||||
this.playerHead:SetLayer(self.sortingOrder)
|
||||
end
|
||||
if this.playerInfoView then
|
||||
this.playerInfoView:SetLayer(self.sortingOrder)
|
||||
end
|
||||
end
|
||||
function this.RefreshStageShow()
|
||||
-- 关闭按钮显示
|
||||
|
|
@ -594,8 +547,6 @@ function GuildMainCityPanel:OnDestroy()
|
|||
|
||||
-- 清除红点
|
||||
ClearRedPointObject(RedPointType.Guild_RedPacket, this.btnRedPacketRedPoint)
|
||||
ClearRedPointObject(RedPointType.Setting, this.headRedpot)
|
||||
ClearRedPointObject(RedPointType.VipPrivilege, this.vipRedPoint)
|
||||
|
||||
this.playerHead = nil
|
||||
|
||||
|
|
@ -604,6 +555,10 @@ function GuildMainCityPanel:OnDestroy()
|
|||
this.LiveName = nil
|
||||
this.LiveGO = nil
|
||||
end
|
||||
if this.playerInfoView then
|
||||
SubUIManager.Close(this.playerInfoView)
|
||||
this.playerInfoView = nil
|
||||
end
|
||||
end
|
||||
|
||||
return GuildMainCityPanel
|
||||
|
|
@ -469,6 +469,7 @@ function this.SetPlayerMountTime(id,validTime)
|
|||
singData.overTime = validTime
|
||||
this.userMountList[singData.mountId] = singData
|
||||
this.SetPlayerRideRedPoint(PlayerTitleRideSkinRedPointTypeStr.Ride,1)
|
||||
FormationManager.UserPowerChanged()
|
||||
end
|
||||
else--为空时是删除数据 倒计时结束时
|
||||
if this.userMountList[id] then
|
||||
|
|
|
|||
|
|
@ -765,5 +765,8 @@ function this:ResolveUpdateHeroInfoData()
|
|||
end
|
||||
end
|
||||
this:UpdateHeroInfoData()--刷新界面方法
|
||||
if isUpZhen then
|
||||
FormationManager.UserPowerChanged()
|
||||
end
|
||||
end
|
||||
return this
|
||||
|
|
@ -266,5 +266,6 @@ function this.RefrehsHeroAndTalisman()
|
|||
end
|
||||
end
|
||||
this:OnShowHeroAndTalisman()--刷新界面方法
|
||||
FormationManager.UserPowerChanged()
|
||||
end
|
||||
return RoleTalismanPanelV2
|
||||
|
|
@ -25,19 +25,11 @@ function VipPanelV2:InitComponent()
|
|||
screenAdapte(self.bg)
|
||||
end
|
||||
|
||||
if not this.playerInfoView then
|
||||
this.playerInfoView = SubUIManager.Open(SubUIConfig.PlayerInfoView, this.transform)
|
||||
end
|
||||
this.BtView = SubUIManager.Open(SubUIConfig.BtView, self.transform)
|
||||
this.UpView = SubUIManager.Open(SubUIConfig.UpView, self.transform)
|
||||
|
||||
-- 嚣张的头像
|
||||
this.level = Util.GetGameObject(self.gameObject, "LeftUp/headBox/lvFrame/lv"):GetComponent("Text")
|
||||
this.playName = Util.GetGameObject(self.gameObject, "LeftUp/headBox/name"):GetComponent("Text")
|
||||
this.expSliderValue = Util.GetGameObject(self.gameObject, "LeftUp/headBox/exp"):GetComponent("Slider")
|
||||
this.expSliderValue.transform.localScale = Vector3.New(UIManager.adapterScale, 1, 1)
|
||||
|
||||
this.headBox = Util.GetGameObject(self.gameObject, "LeftUp/headBox")
|
||||
this.headPos = Util.GetGameObject(self.gameObject, "LeftUp/headBox/headpos")
|
||||
this.headRedpot = Util.GetGameObject(self.gameObject, "LeftUp/headBox/redpot")
|
||||
this.teamPower = Util.GetGameObject(self.gameObject, "LeftUp/powerBtn/value"):GetComponent("Text")
|
||||
-- self.BtnBack = Util.GetGameObject(self.transform, "btnBack")
|
||||
-- this.helpBtn = Util.GetGameObject(self.gameObject, "helpBtn")
|
||||
-- this.helpPosition=this.helpBtn:GetComponent("RectTransform").localPosition
|
||||
|
|
@ -90,28 +82,6 @@ function VipPanelV2:InitComponent()
|
|||
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)
|
||||
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 VipPanelV2:BindEvent()
|
||||
|
||||
--帮助按钮
|
||||
|
|
@ -171,16 +141,17 @@ function VipPanelV2:OnSortingOrderChange()
|
|||
Util.AddParticleSortLayer(self.effect, self.sortingOrder - orginLayer)
|
||||
orginLayer = self.sortingOrder
|
||||
-- 头像层级
|
||||
if this.playerHead then
|
||||
this.playerHead:SetLayer(self.sortingOrder)
|
||||
-- if this.playerHead then
|
||||
-- this.playerHead:SetLayer(self.sortingOrder)
|
||||
-- end
|
||||
if this.playerInfoView then
|
||||
this.playerInfoView:SetLayer(self.sortingOrder)
|
||||
end
|
||||
end
|
||||
|
||||
function VipPanelV2:OnShow()
|
||||
self:InitVipContext()
|
||||
self:SetPanelStatus()
|
||||
this.FreshPlayerInfo()
|
||||
this.SetPlayerHead()
|
||||
end
|
||||
|
||||
function VipPanelV2:OnClose()
|
||||
|
|
@ -199,9 +170,13 @@ function VipPanelV2:OnDestroy()
|
|||
SubUIManager.Close(this.UpView)
|
||||
SubUIManager.Close(this.BtView)
|
||||
SubUIManager.Close(this.playerHead)
|
||||
this.playerHead = nil
|
||||
-- this.playerHead = nil
|
||||
this.UpView = nil
|
||||
this.BtView = nil
|
||||
if this.playerInfoView then
|
||||
SubUIManager.Close(this.playerInfoView)
|
||||
this.playerInfoView = nil
|
||||
end
|
||||
end
|
||||
|
||||
function VipPanelV2:InitVipContext()
|
||||
|
|
@ -490,9 +465,14 @@ function VipPanelV2:OnTurnRightBtnClicked()
|
|||
end
|
||||
|
||||
function VipPanelV2:OnBtnLvUpClicked()
|
||||
local oldPowerNum = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
|
||||
NetManager.RequestVipLevelUp(function(respond)
|
||||
self:OnShow()
|
||||
SoundManager.PlaySound(SoundConfig.Sound_VipUpLevel)
|
||||
local newPowerNum = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
|
||||
if oldPowerNum ~= newPowerNum then
|
||||
UIManager.OpenPanel(UIName.WarPowerChangeNotifyPanelV2,{oldValue = oldPowerNum,newValue = newPowerNum})
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -37,7 +37,7 @@ end
|
|||
function PlayerInfoView:BindEvent()
|
||||
--GM工具
|
||||
Util.AddClick(self.headBox, function()
|
||||
if AppConst.isOpenGM then
|
||||
if AppConst.isOpenGM and UIManager.IsOpen(UIName.MainPanel) then
|
||||
UIManager.OpenPanel(UIName.GMPanel)
|
||||
else
|
||||
UIManager.OpenPanel(UIName.SettingPanel)
|
||||
|
|
@ -54,6 +54,9 @@ end
|
|||
function PlayerInfoView:AddListener()
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Bag.BagGold, self.OnShow, self)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Player.OnPlayerLvChange, self.OnShow, self)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Player.OnChangeName, self.OnShow, self)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Player.OnHeadFrameChange, self.OnShow, self)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Player.OnHeadChange, self.OnShow, self)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Formation.OnFormationChange, self.RefreshPower, self)
|
||||
|
||||
-- 绑定红点
|
||||
|
|
@ -65,6 +68,9 @@ end
|
|||
function PlayerInfoView:RemoveListener()
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.Bag.BagGold, self.OnShow, self)
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.Player.OnPlayerLvChange, self.OnShow, self)
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.Player.OnChangeName, self.OnShow, self)
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.Player.OnHeadFrameChange, self.OnShow, self)
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.Player.OnHeadChange, self.OnShow, self)
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.Formation.OnFormationChange, self.RefreshPower, self)
|
||||
|
||||
-- 解除绑定
|
||||
|
|
|
|||
Loading…
Reference in New Issue