loading图修改提交
parent
196af02806
commit
132967b3f5
|
@ -579,6 +579,7 @@ RectTransform:
|
|||
- {fileID: 224897839331608426}
|
||||
- {fileID: 224189031716679638}
|
||||
- {fileID: 224170469337608860}
|
||||
- {fileID: 3739793586502117409}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
@ -776,3 +777,38 @@ MonoBehaviour:
|
|||
m_VerticalOverflow: 1
|
||||
m_LineSpacing: 1
|
||||
m_Text: 56%
|
||||
--- !u!1 &6054713453531436585
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3739793586502117409}
|
||||
m_Layer: 5
|
||||
m_Name: heroPos
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &3739793586502117409
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6054713453531436585}
|
||||
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: 224146081376869738}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
|
|
|
@ -660,6 +660,7 @@ RectTransform:
|
|||
m_Children:
|
||||
- {fileID: 224121973653826062}
|
||||
- {fileID: 224378580002514778}
|
||||
- {fileID: 8685686792836650040}
|
||||
m_Father: {fileID: 224128961350707970}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
@ -3532,7 +3533,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -6.7}
|
||||
m_AnchoredPosition: {x: 0, y: -6.699997}
|
||||
m_SizeDelta: {x: 0, y: -13.3}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &5174286553451481561
|
||||
|
@ -3567,3 +3568,138 @@ MonoBehaviour:
|
|||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.ScrollRect+ScrollRectEvent, UnityEngine.UI, Version=1.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
--- !u!1001 &8223188811755738369
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 224244606442967202}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1278836279125380824, guid: f82b8c26a95399b42a3130f8cea62404,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: live2d_c_0001
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 763185011175080249, guid: f82b8c26a95399b42a3130f8cea62404,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 763185011175080249, guid: f82b8c26a95399b42a3130f8cea62404,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 763185011175080249, guid: f82b8c26a95399b42a3130f8cea62404,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 763185011175080249, guid: f82b8c26a95399b42a3130f8cea62404,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 763185011175080249, guid: f82b8c26a95399b42a3130f8cea62404,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 763185011175080249, guid: f82b8c26a95399b42a3130f8cea62404,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 763185011175080249, guid: f82b8c26a95399b42a3130f8cea62404,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 763185011175080249, guid: f82b8c26a95399b42a3130f8cea62404,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 763185011175080249, guid: f82b8c26a95399b42a3130f8cea62404,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 763185011175080249, guid: f82b8c26a95399b42a3130f8cea62404,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 763185011175080249, guid: f82b8c26a95399b42a3130f8cea62404,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 763185011175080249, guid: f82b8c26a95399b42a3130f8cea62404,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 763185011175080249, guid: f82b8c26a95399b42a3130f8cea62404,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -200
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 763185011175080249, guid: f82b8c26a95399b42a3130f8cea62404,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 100
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 763185011175080249, guid: f82b8c26a95399b42a3130f8cea62404,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 100
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 763185011175080249, guid: f82b8c26a95399b42a3130f8cea62404,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 763185011175080249, guid: f82b8c26a95399b42a3130f8cea62404,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 763185011175080249, guid: f82b8c26a95399b42a3130f8cea62404,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 763185011175080249, guid: f82b8c26a95399b42a3130f8cea62404,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 763185011175080249, guid: f82b8c26a95399b42a3130f8cea62404,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 763185011175080249, guid: f82b8c26a95399b42a3130f8cea62404,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 763185011175080249, guid: f82b8c26a95399b42a3130f8cea62404,
|
||||
type: 3}
|
||||
propertyPath: m_LocalScale.x
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 763185011175080249, guid: f82b8c26a95399b42a3130f8cea62404,
|
||||
type: 3}
|
||||
propertyPath: m_LocalScale.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: f82b8c26a95399b42a3130f8cea62404, type: 3}
|
||||
--- !u!224 &8685686792836650040 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 763185011175080249, guid: f82b8c26a95399b42a3130f8cea62404,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 8223188811755738369}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
|
|
@ -2,13 +2,17 @@ require("Base/BasePanel")
|
|||
LoadingPanel = Inherit(BasePanel)
|
||||
local this = LoadingPanel
|
||||
local tipsConfig = ConfigManager.GetConfig(ConfigName.Tips)
|
||||
local heroConfig=ConfigManager.GetConfig(ConfigName.HeroConfig)
|
||||
--初始化组件(用于子类重写)
|
||||
local spineName=nil
|
||||
local spineObj=nil
|
||||
function LoadingPanel:InitComponent()
|
||||
--
|
||||
this.Slider = Util.GetGameObject(self.gameObject, "Slider"):GetComponent("Slider")
|
||||
this.Tip = Util.GetGameObject(self.gameObject, "Slider/Image/LoadingText"):GetComponent("Text")
|
||||
this.SliderText = Util.GetGameObject(self.gameObject, "Slider/Fill Area/Fill/Image/Text"):GetComponent("Text")
|
||||
this.bg = Util.GetGameObject(self.gameObject, "bg1"):GetComponent("Image")
|
||||
this.heroPos=Util.GetGameObject(self.gameObject, "heroPos")
|
||||
screenAdapte(Util.GetGameObject(self.gameObject, "bg1"))
|
||||
screenAdapte(Util.GetGameObject(self.gameObject, "bg2"))
|
||||
end
|
||||
|
@ -66,17 +70,33 @@ function LoadingPanel.Start()
|
|||
this.spLoader = SpriteLoader.New()
|
||||
|
||||
local spName = "loading1"
|
||||
local sprites = PackageManager.GetLoadingList()
|
||||
if sprites then
|
||||
math.randomseed(os.time())
|
||||
local index = math.random(1, #sprites)
|
||||
spName = sprites[index]
|
||||
end
|
||||
-- local sprites = PackageManager.GetLoadingList()
|
||||
-- if sprites then
|
||||
-- math.randomseed(os.time())
|
||||
-- local index = math.random(1, #sprites)
|
||||
-- spName = sprites[index]
|
||||
-- end
|
||||
|
||||
|
||||
LoadStreamingTexture(this.spLoader, spName, function(sp)
|
||||
if #callList <= 1 then
|
||||
return
|
||||
end
|
||||
UIManager.OpenPanel(UIName.LoadingPanel, sp)
|
||||
UIManager.OpenPanel(UIName.LoadingPanel,this.spLoader:LoadSprite(spName))
|
||||
--LogError("heroconfig i================="..heroConfig[10001].Id.." len==="..#heroConfig)
|
||||
local spineLive=math.random(10001,10050)
|
||||
if spineObj~=nil and spineName~=nil then
|
||||
poolManager:UnLoadLive(spineName, spineObj, PoolManager.AssetType.GameObject)
|
||||
end
|
||||
local heroConfig=ConfigManager.TryGetConfigData(ConfigName.HeroConfig,spineLive)
|
||||
if heroConfig then
|
||||
spineName=GetResourcePath(heroConfig.Live)
|
||||
spineObj= poolManager:LoadLive(spineName,this.heroPos.transform, Vector3.one * heroConfig.Scale, Vector3.New(heroConfig.Position[1], heroConfig.Position[2], 0))
|
||||
spineObj.transform:SetParent(this.heroPos.transform)
|
||||
-- spineObj.transform.localPosition = Vector2.New(0, -20)
|
||||
-- spineObj.transform.localScale=Vector3.one
|
||||
end
|
||||
|
||||
UpdateBeat:Add(update)
|
||||
lerp = 0
|
||||
curIndex = 0
|
||||
|
@ -91,7 +111,11 @@ function LoadingPanel.End()
|
|||
UpdateBeat:Remove(update)
|
||||
this:ClosePanel()
|
||||
callList = {}
|
||||
|
||||
if spineObj~=nil and spineName~=nil then
|
||||
poolManager:UnLoadLive(spineName, spineObj, PoolManager.AssetType.GameObject)
|
||||
end
|
||||
spineName=nil
|
||||
spineObj=nil
|
||||
this.spLoader:Destroy()
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue