【界面优化】技能

dev_chengFeng
ZhangBiao 2021-10-26 18:18:36 +08:00
parent d5cf1c5395
commit 779cb4d99e
2 changed files with 5 additions and 39 deletions

View File

@ -449,7 +449,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: 135
m_MinHeight: 80
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
@ -682,9 +682,9 @@ RectTransform:
m_Father: {fileID: 1506569333037798674}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 80, y: -100}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -210, y: -20}
m_SizeDelta: {x: 90.28, y: 90.28}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7773945753414332579

View File

@ -11,15 +11,9 @@ function this:InitComponent()
this.backBtn = Util.GetGameObject(self.transform, "Button")
this.skillTypeImage=Util.GetGameObject(self.transform,"Content/SkillTypeImage"):GetComponent("Image")
this.icon = Util.GetGameObject(self.transform, "Content/IconBG/Icon"):GetComponent("Image")
-- this.skillLv = Util.GetGameObject(self.transform, "Content/IconBG/Level/Text"):GetComponent("Text")
this.skillName = Util.GetGameObject(self.transform, "Content/Title/Text"):GetComponent("Text")
-- this.desc = Util.GetGameObject(self.transform, "Content/Desc/Text"):GetComponent("Text")
this.cureffect = Util.GetGameObject(self.transform, "Content/CurrentLvDesc/Text"):GetComponent("Text")
-- this.skillNextObg = Util.GetGameObject(self.transform, "Content/NextLv")
-- this.skillNextObg:SetActive(false)
-- this.nextEffect = Util.GetGameObject(self.transform, "Content/NextLv/NextLvDesc/Text"):GetComponent("Text")
this.rect=Util.GetGameObject(self.transform,"Content"):GetComponent("RectTransform")
end
@ -70,7 +64,6 @@ function this:OnOpen(...)
this.content.anchoredPosition = args[6]
end
this.icon.sprite = this.spLoader:LoadSprite(GetResourcePath(curSkillData.skillConfig.Icon))
--this.skillLv.text = curSkillData.skillConfig.Id % dividend --神奇的取等级
this.skillName.text = GetLanguageStrById(curSkillData.skillConfig.Name)
--获取RoleInfoPanel的curUpStarData以获取妖灵师最高等级
@ -81,18 +74,8 @@ function this:OnOpen(...)
elseif curSkillData.skillConfig.Type == SkillType.Bei then
this.skillTypeImage.sprite=this.spLoader:LoadSprite(SkillIconType[SkillType.Bei])--被动技
end
-- local skillLogiData=ConfigManager.GetConfigData(ConfigName.SkillLogicConfig,curSkillData.skillConfig.Id)
-- local ShortDesc = GetLanguageStrById(curSkillData.skillConfig.ShortDesc) or ""
-- local rateCasting=0
-- if skillLogiData.CD>0 then
-- rateCasting=skillLogiData.CD/1000
-- this.desc.text="施法率:"..rateCasting.."%".."\n".."最高等级<color=#DA9649><b>"..maxLv.."</b></color>".."\n"..ShortDesc
-- else
-- this.desc.text="最高等级<color=#DA9649><b>"..maxLv.."</b></color>".."\n"..ShortDesc
-- end
this.cureffect.transform:DOAnchorPosY(0,0,true)
--curSkillData.skillConfig.Id % dividend
this.cureffect.text = GetSkillConfigDesc(curSkillData.skillConfig)--Language[10453].."<color=#DA9649><b>".. 1 .."</b></color>\n"..
this.cureffect.text = GetSkillConfigDesc(curSkillData.skillConfig)
local nextCfg
if curSkillData.skillConfig.Type==SkillType.Pu then
@ -102,18 +85,6 @@ function this:OnOpen(...)
elseif curSkillData.skillConfig.Type==SkillType.Bei then
nextCfg = ConfigManager.TryGetConfigData(ConfigName.PassiveSkillConfig, curSkillData.skillConfig.Id+1)
end
-- if nextCfg and nextCfg.Desc then
--this.skillNextObg:SetActive(true)
-- local nextLv=curSkillData.skillConfig.Id % dividend+1
-- if nextLv>5 then
-- nextLv=5
-- end
-- this.nextEffect.transform:DOAnchorPosY(0,0,true)
-- this.nextEffect.text ="等级".."<color=#DA9649><b>"..nextLv.."</b></color>\n"..GetSkillConfigDesc(nextCfg)
-- else
-- this.skillNextObg:SetActive(false)
-- end
end
--界面关闭时调用(用于子类重写)
@ -140,14 +111,9 @@ function this.CheckPointer()
if this.value1.x>this.curLvRect.sizeDelta.x and
this.value1.x<0-- and
--this.value1.y<this.curLvRect.localPosition.y and
--this.value1.y>this.curLvRect.localPosition.y
then
return
end
--if CheckLOrR(this.value)==0 then
-- return
--end
this.rect=nil
this:ClosePanel()
UpdateBeat:Remove(update, this)