82 lines
3.8 KiB
Lua
82 lines
3.8 KiB
Lua
|
require("Base/BasePanel")
|
|||
|
GuildTranscriptMainPopup = Inherit(BasePanel)
|
|||
|
local this = GuildTranscriptMainPopup
|
|||
|
--初始化组件(用于子类重写)
|
|||
|
function GuildTranscriptMainPopup:InitComponent()
|
|||
|
--btn
|
|||
|
this.backBtn = Util.GetGameObject(self.gameObject, "btnBack")
|
|||
|
this.helpBtn = Util.GetGameObject(self.gameObject,"HelpBtn")
|
|||
|
this.helpPos = this.helpBtn:GetComponent("RectTransform").localPosition
|
|||
|
this.quickWarbtn = Util.GetGameObject(self.gameObject,"quickWarbtn")
|
|||
|
this.warbtn = Util.GetGameObject(self.gameObject,"warbtn")
|
|||
|
this.rankBun = Util.GetGameObject(self.gameObject,"middleGo/rankBun")
|
|||
|
this.sendBtn = Util.GetGameObject(self.gameObject,"middleGo/sendBtn")
|
|||
|
this.endNumBtn = Util.GetGameObject(self.gameObject,"middleGo/endNumBtn")
|
|||
|
--text
|
|||
|
this.name = Util.GetGameObject(self.gameObject,"middleGo/endNumBtn"):GetComponent("Text")--军团副本
|
|||
|
this.rewardGoText1 = Util.GetGameObject(self.gameObject,"middleGo/rewardGo/tip/Text1"):GetComponent("Text")--单次奖励
|
|||
|
this.rewardGoText2 = Util.GetGameObject(self.gameObject,"middleGo/rewardGo/tip/Text2"):GetComponent("Text")--击杀奖励
|
|||
|
this.attackInfoText = Util.GetGameObject(self.gameObject,"middleGo/attackInfo/attackInfoText"):GetComponent("Text")--全军团成员攻击力+16%
|
|||
|
this.attackInfoTime = Util.GetGameObject(self.gameObject,"middleGo/attackInfo/attackInfoTime"):GetComponent("Text")--(08:52:24后失效)
|
|||
|
this.endNumText = Util.GetGameObject(self.gameObject,"middleGo/endNumBtn/endNumText"):GetComponent("Text")--剩余购买次数:3
|
|||
|
this.endNumBuyText = Util.GetGameObject(self.gameObject,"middleGo/endNumBtn/endNumBuyText"):GetComponent("Text")--剩余次数:22
|
|||
|
--boss
|
|||
|
this.boss = Util.GetGameObject(self.gameObject,"middleGo/boss")
|
|||
|
this.bossHerobg=Util.GetGameObject(this.boss,"Bg1"):GetComponent("Image")
|
|||
|
this.bossHerolive = Util.GetGameObject(this.boss, "Mask/icon"):GetComponent("RawImage")
|
|||
|
this.bossHerohpPass = Util.GetGameObject(this.boss,"hpPass"):GetComponent("Image")
|
|||
|
this.bossHerohpPassText = Util.GetGameObject(this.boss,"hpText"):GetComponent("Text")
|
|||
|
|
|||
|
--绑定事件(用于子类重写)
|
|||
|
function GuildTranscriptMainPopup:BindEvent()
|
|||
|
Util.AddClick(this.helpBtn,function()
|
|||
|
UIManager.OpenPanel(UIName.HelpPopup,HELP_TYPE.GuildSkill,this.helpPos.x,this.helpPos.y)
|
|||
|
end)
|
|||
|
Util.AddClick(this.backBtn,function()
|
|||
|
self:ClosePanel()
|
|||
|
end)
|
|||
|
|
|||
|
end
|
|||
|
--添加事件监听(用于子类重写)
|
|||
|
function GuildTranscriptMainPopup:AddListener()
|
|||
|
end
|
|||
|
|
|||
|
--移除事件监听(用于子类重写)
|
|||
|
function GuildTranscriptMainPopup:RemoveListener()
|
|||
|
end
|
|||
|
|
|||
|
--界面打开时调用(用于子类重写)
|
|||
|
function GuildTranscriptMainPopup:OnOpen(_curIndex)
|
|||
|
curIndex = _curIndex or 1
|
|||
|
tabRedPotList = {}
|
|||
|
end
|
|||
|
|
|||
|
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
|||
|
function GuildTranscriptMainPopup:OnShow()
|
|||
|
|
|||
|
end
|
|||
|
|
|||
|
--显示boss立绘信息
|
|||
|
function this.ShowBossInfo()
|
|||
|
this.bossHerobg.sprite = Util.LoadSprite(GetHeroCardStarBg[_star])
|
|||
|
this.bossHerohpPass.fillAmount = curHeroHpVal or 1
|
|||
|
this.bossHerohpPassText.Text = 1
|
|||
|
local liveName = GetResourcePath(heroConfig.Live)
|
|||
|
local roleConfig = ConfigManager.GetConfigData(ConfigName.RoleConfig, heroConfig.Id)
|
|||
|
local scale = roleConfig.play_liveScale
|
|||
|
local livePos = Vector3.New(roleConfig.offset[1], roleConfig.offset[2], 0)
|
|||
|
this.compoundHerolive.texture = CardRendererManager.GetSpineTexture(1, liveName, Vector3.one * scale, livePos, true)
|
|||
|
this.compoundHerolive.transform.localScale = Vector3.one
|
|||
|
this.compoundHerolive.transform.localPosition = Vector3.zero
|
|||
|
|
|||
|
end
|
|||
|
--界面关闭时调用(用于子类重写)
|
|||
|
function GuildTranscriptMainPopup:OnClose()
|
|||
|
tabRedPotList = {}
|
|||
|
end
|
|||
|
|
|||
|
--界面销毁时调用(用于子类重写)
|
|||
|
function GuildTranscriptMainPopup:OnDestroy()
|
|||
|
end
|
|||
|
|
|||
|
return GuildTranscriptMainPopup
|