【修行】神印界面提交

dev_chengFeng
ZhangBiao 2021-05-20 11:57:27 +08:00
parent 40cafcca32
commit ae10b715cd
3 changed files with 20 additions and 40 deletions

View File

@ -214,7 +214,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1 m_RaycastTarget: 0
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
@ -1366,7 +1366,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1 m_RaycastTarget: 0
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
@ -2404,7 +2404,6 @@ GameObject:
- component: {fileID: 2851222674483561166} - component: {fileID: 2851222674483561166}
- component: {fileID: 9103983125958741125} - component: {fileID: 9103983125958741125}
- component: {fileID: 3192490633842889124} - component: {fileID: 3192490633842889124}
- component: {fileID: 2118592718510322225}
m_Layer: 0 m_Layer: 0
m_Name: grid m_Name: grid
m_TagString: Untagged m_TagString: Untagged
@ -2428,7 +2427,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0.45013428} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 1, y: 1} m_Pivot: {x: 1, y: 1}
--- !u!114 &9103983125958741125 --- !u!114 &9103983125958741125
@ -2468,26 +2467,6 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_HorizontalFit: 0 m_HorizontalFit: 0
m_VerticalFit: 2 m_VerticalFit: 2
--- !u!114 &2118592718510322225
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3628100453858938618}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: 1808
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &3632051549540542228 --- !u!1 &3632051549540542228
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -2627,7 +2606,7 @@ RectTransform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3853548438243551823} m_GameObject: {fileID: 3853548438243551823}
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: 100} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 2851222674483561166} - {fileID: 2851222674483561166}
@ -2636,9 +2615,9 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -56.4} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: -112.9} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 1, y: 1}
--- !u!114 &5559974153339085360 --- !u!114 &5559974153339085360
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -6,7 +6,8 @@ function PracticeImprint:InitComponent()
self.spLoader = SpriteLoader.New() self.spLoader = SpriteLoader.New()
self.UpView = SubUIManager.Open(SubUIConfig.UpView, self.transform) self.UpView = SubUIManager.Open(SubUIConfig.UpView, self.transform)
self.backBtn = Util.GetGameObject(self.gameObject, "backBtn") self.backBtn = Util.GetGameObject(self.gameObject, "backBtn")
self.Scroll = Util.GetGameObject(self.gameObject, "Scroll/grid") self.Scroll = Util.GetGameObject(self.gameObject, "Scroll")
self.Scrollgrid = Util.GetGameObject(self.gameObject, "Scroll/grid")
self.ImprintPre = Util.GetGameObject(self.gameObject, "ImprintPre") self.ImprintPre = Util.GetGameObject(self.gameObject, "ImprintPre")
self.ImprintInfo = Util.GetGameObject(self.gameObject, "ImprintInfo") self.ImprintInfo = Util.GetGameObject(self.gameObject, "ImprintInfo")
self.ImprintInfoBack = Util.GetGameObject(self.ImprintInfo, "close") self.ImprintInfoBack = Util.GetGameObject(self.ImprintInfo, "close")
@ -25,12 +26,10 @@ function PracticeImprint:InitComponent()
self.doBtn = Util.GetGameObject(self.ImprintInfo, "Content/Btn") self.doBtn = Util.GetGameObject(self.ImprintInfo, "Content/Btn")
self.doBtnText = Util.GetGameObject(self.doBtn, "Text"):GetComponent("Text") self.doBtnText = Util.GetGameObject(self.doBtn, "Text"):GetComponent("Text")
-- local rootHight = self.Scroll.transform.rect.height self.sizeDelta = {
-- local width = self.Scroll.transform.rect.width [1] = Vector2.New(0,0),
-- self.ScrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, self.Scroll.transform, [2] = Vector2.New(0,-608),
-- self.ImprintPre, nil,Vector2.New(width, rootHight), 1, 1,Vector2.New(35, 0)) }
-- self.ScrollView.moveTween.MomentumAmount = 1
-- self.ScrollView.moveTween.Strength = 2
self.ImprintList = {} self.ImprintList = {}
end end
@ -40,6 +39,7 @@ function PracticeImprint:BindEvent()
end) end)
Util.AddClick(self.ImprintInfoBack, function() Util.AddClick(self.ImprintInfoBack, function()
self.ImprintInfo:SetActive(false) self.ImprintInfo:SetActive(false)
self.Scroll:GetComponent("RectTransform").sizeDelta = self.sizeDelta[1]
end) end)
end end
@ -64,9 +64,7 @@ end
function PracticeImprint:Refresh(isTop,isAni,func) function PracticeImprint:Refresh(isTop,isAni,func)
self.allImprintData = PracticeManager.GetAllImprintData() self.allImprintData = PracticeManager.GetAllImprintData()
self.ImprintInfo:SetActive(false) self.ImprintInfo:SetActive(false)
-- self.ScrollView:SetData(self.allImprintData, function(index, go) self.Scroll:GetComponent("RectTransform").sizeDelta = self.sizeDelta[1]
-- self:SetPre(index,go,self.allImprintData[index])
-- end,isTop,isAni)
if not self.ImprintList then if not self.ImprintList then
self.ImprintList = {} self.ImprintList = {}
@ -78,7 +76,7 @@ function PracticeImprint:Refresh(isTop,isAni,func)
local data = self.allImprintData[i] local data = self.allImprintData[i]
if not self.ImprintList[i] then if not self.ImprintList[i] then
self.ImprintList[i] = newObject(self.ImprintPre) self.ImprintList[i] = newObject(self.ImprintPre)
self.ImprintList[i].transform:SetParent(self.Scroll.transform) self.ImprintList[i].transform:SetParent(self.Scrollgrid.transform)
self.ImprintList[i].transform.localScale = Vector3.one self.ImprintList[i].transform.localScale = Vector3.one
self.ImprintList[i].transform.localPosition = Vector3.zero self.ImprintList[i].transform.localPosition = Vector3.zero
end end
@ -136,6 +134,7 @@ function PracticeImprint:SetSingleImprint(_go,_imprintId)
Util.AddOnceClick(maskBtn,function () Util.AddOnceClick(maskBtn,function ()
self.ImprintInfo:SetActive(true) self.ImprintInfo:SetActive(true)
self.Scroll:GetComponent("RectTransform").sizeDelta = self.sizeDelta[2]
self:ShowSingleImprintInfoLayout(serverData,configData) self:ShowSingleImprintInfoLayout(serverData,configData)
end) end)
end end
@ -185,6 +184,7 @@ function PracticeImprint:ShowSingleImprintInfoLayout(_serverData,_configData)
NetManager.PracticeImprintRequest(old,new,tostring(sub),function () NetManager.PracticeImprintRequest(old,new,tostring(sub),function ()
self:Refresh(true,true,function () self:Refresh(true,true,function ()
self.ImprintInfo:SetActive(true) self.ImprintInfo:SetActive(true)
self.Scroll:GetComponent("RectTransform").sizeDelta = self.sizeDelta[2]
self:ShowSingleImprintInfoLayout(PracticeManager.GetSingleImprintData(new)) self:ShowSingleImprintInfoLayout(PracticeManager.GetSingleImprintData(new))
end) end)
end) end)
@ -227,6 +227,7 @@ function PracticeImprint:ShowSingleImprintInfoLayout(_serverData,_configData)
--刷新 --刷新
self:Refresh(true,true,function () self:Refresh(true,true,function ()
self.ImprintInfo:SetActive(true) self.ImprintInfo:SetActive(true)
self.Scroll:GetComponent("RectTransform").sizeDelta = self.sizeDelta[2]
self:ShowSingleImprintInfoLayout(PracticeManager.GetSingleImprintData(_configData.Id)) self:ShowSingleImprintInfoLayout(PracticeManager.GetSingleImprintData(_configData.Id))
end) end)
end) end)

View File

@ -21,7 +21,7 @@ function this.UpdataFromServer(_level)
this.PracticeLevel = _level this.PracticeLevel = _level
this.PracticeLevel = this.PracticeLevel > 0 and this.PracticeLevel or 1 this.PracticeLevel = this.PracticeLevel > 0 and this.PracticeLevel or 1
this.PracticeBigLevel = XiuXianConfig[this.PracticeLevel].RealmId this.PracticeBigLevel = XiuXianConfig[this.PracticeLevel].RealmId
this.StarNum = PlayerManager.level-- FightLevelManager.GetAllChapterStars() this.StarNum = FightLevelManager.GetAllChapterStars()
end end
--获取当前等级表数据 --获取当前等级表数据