【界面优化】技能
parent
d5cf1c5395
commit
779cb4d99e
|
@ -449,7 +449,7 @@ MonoBehaviour:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_IgnoreLayout: 0
|
m_IgnoreLayout: 0
|
||||||
m_MinWidth: -1
|
m_MinWidth: -1
|
||||||
m_MinHeight: 135
|
m_MinHeight: 80
|
||||||
m_PreferredWidth: -1
|
m_PreferredWidth: -1
|
||||||
m_PreferredHeight: -1
|
m_PreferredHeight: -1
|
||||||
m_FlexibleWidth: -1
|
m_FlexibleWidth: -1
|
||||||
|
@ -682,9 +682,9 @@ RectTransform:
|
||||||
m_Father: {fileID: 1506569333037798674}
|
m_Father: {fileID: 1506569333037798674}
|
||||||
m_RootOrder: 1
|
m_RootOrder: 1
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
m_AnchoredPosition: {x: 80, y: -100}
|
m_AnchoredPosition: {x: -210, y: -20}
|
||||||
m_SizeDelta: {x: 90.28, y: 90.28}
|
m_SizeDelta: {x: 90.28, y: 90.28}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &7773945753414332579
|
--- !u!222 &7773945753414332579
|
||||||
|
|
|
@ -11,15 +11,9 @@ function this:InitComponent()
|
||||||
this.backBtn = Util.GetGameObject(self.transform, "Button")
|
this.backBtn = Util.GetGameObject(self.transform, "Button")
|
||||||
this.skillTypeImage=Util.GetGameObject(self.transform,"Content/SkillTypeImage"):GetComponent("Image")
|
this.skillTypeImage=Util.GetGameObject(self.transform,"Content/SkillTypeImage"):GetComponent("Image")
|
||||||
this.icon = Util.GetGameObject(self.transform, "Content/IconBG/Icon"):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.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.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")
|
this.rect=Util.GetGameObject(self.transform,"Content"):GetComponent("RectTransform")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -70,7 +64,6 @@ function this:OnOpen(...)
|
||||||
this.content.anchoredPosition = args[6]
|
this.content.anchoredPosition = args[6]
|
||||||
end
|
end
|
||||||
this.icon.sprite = this.spLoader:LoadSprite(GetResourcePath(curSkillData.skillConfig.Icon))
|
this.icon.sprite = this.spLoader:LoadSprite(GetResourcePath(curSkillData.skillConfig.Icon))
|
||||||
--this.skillLv.text = curSkillData.skillConfig.Id % dividend --神奇的取等级
|
|
||||||
this.skillName.text = GetLanguageStrById(curSkillData.skillConfig.Name)
|
this.skillName.text = GetLanguageStrById(curSkillData.skillConfig.Name)
|
||||||
|
|
||||||
--获取RoleInfoPanel的curUpStarData,以获取妖灵师最高等级
|
--获取RoleInfoPanel的curUpStarData,以获取妖灵师最高等级
|
||||||
|
@ -81,18 +74,8 @@ function this:OnOpen(...)
|
||||||
elseif curSkillData.skillConfig.Type == SkillType.Bei then
|
elseif curSkillData.skillConfig.Type == SkillType.Bei then
|
||||||
this.skillTypeImage.sprite=this.spLoader:LoadSprite(SkillIconType[SkillType.Bei])--被动技
|
this.skillTypeImage.sprite=this.spLoader:LoadSprite(SkillIconType[SkillType.Bei])--被动技
|
||||||
end
|
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)
|
this.cureffect.transform:DOAnchorPosY(0,0,true)
|
||||||
--curSkillData.skillConfig.Id % dividend
|
this.cureffect.text = GetSkillConfigDesc(curSkillData.skillConfig)
|
||||||
this.cureffect.text = GetSkillConfigDesc(curSkillData.skillConfig)--Language[10453].."<color=#DA9649><b>".. 1 .."</b></color>\n"..
|
|
||||||
|
|
||||||
local nextCfg
|
local nextCfg
|
||||||
if curSkillData.skillConfig.Type==SkillType.Pu then
|
if curSkillData.skillConfig.Type==SkillType.Pu then
|
||||||
|
@ -102,18 +85,6 @@ function this:OnOpen(...)
|
||||||
elseif curSkillData.skillConfig.Type==SkillType.Bei then
|
elseif curSkillData.skillConfig.Type==SkillType.Bei then
|
||||||
nextCfg = ConfigManager.TryGetConfigData(ConfigName.PassiveSkillConfig, curSkillData.skillConfig.Id+1)
|
nextCfg = ConfigManager.TryGetConfigData(ConfigName.PassiveSkillConfig, curSkillData.skillConfig.Id+1)
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
--界面关闭时调用(用于子类重写)
|
--界面关闭时调用(用于子类重写)
|
||||||
|
@ -140,14 +111,9 @@ function this.CheckPointer()
|
||||||
|
|
||||||
if this.value1.x>this.curLvRect.sizeDelta.x and
|
if this.value1.x>this.curLvRect.sizeDelta.x and
|
||||||
this.value1.x<0-- and
|
this.value1.x<0-- and
|
||||||
--this.value1.y<this.curLvRect.localPosition.y and
|
|
||||||
--this.value1.y>this.curLvRect.localPosition.y
|
|
||||||
then
|
then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
--if CheckLOrR(this.value)==0 then
|
|
||||||
-- return
|
|
||||||
--end
|
|
||||||
this.rect=nil
|
this.rect=nil
|
||||||
this:ClosePanel()
|
this:ClosePanel()
|
||||||
UpdateBeat:Remove(update, this)
|
UpdateBeat:Remove(update, this)
|
||||||
|
|
Loading…
Reference in New Issue