【登录视频】优化静态背景切换到视频的效果
parent
a83f6848a7
commit
f708fb6671
|
@ -31,7 +31,7 @@ RectTransform:
|
|||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8490762427581985335}
|
||||
m_RootOrder: 13
|
||||
m_RootOrder: 14
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
|
@ -219,7 +219,7 @@ RectTransform:
|
|||
m_Children:
|
||||
- {fileID: 2019625878}
|
||||
m_Father: {fileID: 8490762427581985335}
|
||||
m_RootOrder: 14
|
||||
m_RootOrder: 15
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0}
|
||||
m_AnchorMax: {x: 0.5, y: 0}
|
||||
|
@ -299,7 +299,7 @@ RectTransform:
|
|||
- {fileID: 3220495603619167833}
|
||||
- {fileID: 6698311309350352534}
|
||||
m_Father: {fileID: 8490762427581985335}
|
||||
m_RootOrder: 7
|
||||
m_RootOrder: 8
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
|
@ -425,7 +425,7 @@ RectTransform:
|
|||
m_Children:
|
||||
- {fileID: 3617233529308977401}
|
||||
m_Father: {fileID: 8490762427581985335}
|
||||
m_RootOrder: 11
|
||||
m_RootOrder: 12
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
|
@ -532,7 +532,7 @@ RectTransform:
|
|||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8490762427581985335}
|
||||
m_RootOrder: 12
|
||||
m_RootOrder: 13
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
|
@ -581,78 +581,6 @@ MonoBehaviour:
|
|||
m_VerticalOverflow: 1
|
||||
m_LineSpacing: 1
|
||||
m_Text: ver
|
||||
--- !u!1 &3359870870675714931
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3283108695918559999}
|
||||
- component: {fileID: 8139587797343191039}
|
||||
- component: {fileID: 4390134011534434759}
|
||||
m_Layer: 5
|
||||
m_Name: RawImage
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &3283108695918559999
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3359870870675714931}
|
||||
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: 8490762428927022713}
|
||||
m_RootOrder: 2
|
||||
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: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8139587797343191039
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3359870870675714931}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &4390134011534434759
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3359870870675714931}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -98529514, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_Texture: {fileID: 8400000, guid: aa344742525755f468f1743df85b146b, type: 2}
|
||||
m_UVRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
--- !u!1 &4988553398133080000
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -766,7 +694,7 @@ RectTransform:
|
|||
- {fileID: 664046529494124250}
|
||||
- {fileID: 2346972727555489896}
|
||||
m_Father: {fileID: 8490762427581985335}
|
||||
m_RootOrder: 5
|
||||
m_RootOrder: 6
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
|
@ -1298,7 +1226,7 @@ RectTransform:
|
|||
m_Children:
|
||||
- {fileID: 7526472049034455670}
|
||||
m_Father: {fileID: 8490762427581985335}
|
||||
m_RootOrder: 8
|
||||
m_RootOrder: 9
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 0}
|
||||
|
@ -1374,7 +1302,7 @@ RectTransform:
|
|||
m_Children:
|
||||
- {fileID: 4629641777789591742}
|
||||
m_Father: {fileID: 8490762427581985335}
|
||||
m_RootOrder: 6
|
||||
m_RootOrder: 7
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
|
@ -1493,7 +1421,7 @@ RectTransform:
|
|||
m_Children:
|
||||
- {fileID: 5865725808081203410}
|
||||
m_Father: {fileID: 8490762427581985335}
|
||||
m_RootOrder: 9
|
||||
m_RootOrder: 10
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
|
@ -1711,7 +1639,7 @@ RectTransform:
|
|||
m_Children:
|
||||
- {fileID: 5865592566638353244}
|
||||
m_Father: {fileID: 8490762427581985335}
|
||||
m_RootOrder: 10
|
||||
m_RootOrder: 11
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
|
@ -1826,8 +1754,10 @@ GameObject:
|
|||
m_Component:
|
||||
- component: {fileID: 3218301070609729345}
|
||||
- component: {fileID: 2114390341234516742}
|
||||
- component: {fileID: 8690994970764636599}
|
||||
- component: {fileID: 9007495478448601065}
|
||||
m_Layer: 5
|
||||
m_Name: GameObject
|
||||
m_Name: VideoPlayer
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
|
@ -1840,17 +1770,17 @@ RectTransform:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7647703339993553609}
|
||||
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: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_LocalScale: {x: 0.6, y: 0.6, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8490762428927022713}
|
||||
m_RootOrder: 1
|
||||
m_Father: {fileID: 8490762427581985335}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
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: 0, y: 0}
|
||||
m_SizeDelta: {x: 2160, y: 3839.9998}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!328 &2114390341234516742
|
||||
VideoPlayer:
|
||||
|
@ -1886,6 +1816,41 @@ VideoPlayer:
|
|||
m_Looping: 1
|
||||
m_WaitForFirstFrame: 1
|
||||
m_FrameReadyEventEnabled: 0
|
||||
--- !u!222 &8690994970764636599
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7647703339993553609}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &9007495478448601065
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7647703339993553609}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -98529514, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_Texture: {fileID: 8400000, guid: aa344742525755f468f1743df85b146b, type: 2}
|
||||
m_UVRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
--- !u!1 &8490762427106227106
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -11718,6 +11683,7 @@ RectTransform:
|
|||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 3218301070609729345}
|
||||
- {fileID: 8490762428927022713}
|
||||
- {fileID: 8490762427589792645}
|
||||
- {fileID: 8490762427662662575}
|
||||
|
@ -11837,7 +11803,7 @@ RectTransform:
|
|||
m_Children:
|
||||
- {fileID: 8490762428532624649}
|
||||
m_Father: {fileID: 8490762427581985335}
|
||||
m_RootOrder: 1
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
|
@ -11911,7 +11877,7 @@ RectTransform:
|
|||
m_LocalScale: {x: 0.6559416, y: 0.6559416, z: 0.6559416}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8490762427581985335}
|
||||
m_RootOrder: 2
|
||||
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}
|
||||
|
@ -17063,7 +17029,7 @@ RectTransform:
|
|||
m_LocalScale: {x: 0.50172, y: 0.50172, z: 0.50172}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8490762427581985335}
|
||||
m_RootOrder: 3
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
|
@ -41389,10 +41355,8 @@ RectTransform:
|
|||
m_LocalScale: {x: 0.6, y: 0.6, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 8490762427331175395}
|
||||
- {fileID: 3218301070609729345}
|
||||
- {fileID: 3283108695918559999}
|
||||
m_Father: {fileID: 8490762427581985335}
|
||||
m_RootOrder: 0
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
|
@ -41544,7 +41508,7 @@ RectTransform:
|
|||
m_LocalScale: {x: 1.1951014, y: 1.1951014, z: 1.1951014}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8490762427581985335}
|
||||
m_RootOrder: 4
|
||||
m_RootOrder: 5
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
|
|
|
@ -51,8 +51,8 @@ function PackageManager.GetLoadingList()
|
|||
end
|
||||
end
|
||||
|
||||
function PackageManager.SetVideo(obj,Image)
|
||||
Image:SetActive(false)
|
||||
function PackageManager.SetVideo(obj, bg)
|
||||
obj:SetActive(false)
|
||||
if this.config.VideoName then
|
||||
if ServerConfigManager.IsSettingActive(ServerConfigManager.SettingConfig.IS_PLAY_LOGIN_VIDEO) then
|
||||
Log("加载视频:"..tostring(this.config.VideoName))
|
||||
|
@ -63,7 +63,8 @@ function PackageManager.SetVideo(obj,Image)
|
|||
-- video.clip = resMgr:LoadAsset(this.config.VideoName)
|
||||
video.url = AppConst.PersistentDataPath .."/"..tostring(this.config.VideoName)
|
||||
video:Play()
|
||||
Image:SetActive(true)
|
||||
bg:DOFade(0, 2)
|
||||
obj:SetActive(true)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
|
|
@ -60,10 +60,10 @@ function this:InitComponent()
|
|||
this.versionText.text = Language[11136]..LoginRoot_Version
|
||||
|
||||
-- 背景
|
||||
local bg = Util.GetGameObject(this.gameObject, "bg"):GetComponent("Image")
|
||||
this.bg = Util.GetGameObject(this.gameObject, "bg"):GetComponent("Image")
|
||||
this.bgStr = PackageManager.GetLoginPanelBg()
|
||||
if this.bgStr then
|
||||
bg.sprite = this.spLoader:LoadSprite(this.bgStr)
|
||||
this.bg.sprite = this.spLoader:LoadSprite(this.bgStr)
|
||||
end
|
||||
-- logo
|
||||
this.logo = Util.GetGameObject(this.gameObject, "logo"):GetComponent("Image")
|
||||
|
@ -81,8 +81,7 @@ function this:InitComponent()
|
|||
this.healthTip = Util.GetGameObject(this.gameObject, "healthTip")
|
||||
this.healthTip:SetActive(IS_SHOW_HEALTH_TIP)
|
||||
|
||||
this.video = Util.GetGameObject(this.gameObject, "bg/GameObject")
|
||||
this.rawImage = Util.GetGameObject(this.gameObject, "bg/RawImage")
|
||||
this.video = Util.GetGameObject(this.gameObject, "VideoPlayer")
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
|
@ -206,7 +205,7 @@ end
|
|||
--界面打开时调用(用于子类重写)
|
||||
function this:OnOpen(...)
|
||||
--设置背景
|
||||
PackageManager.SetVideo(this.video,this.rawImage)
|
||||
PackageManager.SetVideo(this.video, this.bg)
|
||||
if AppConst.Code ~= "" then
|
||||
MsgPanel.ShowOne(GetLanguageStrById(AppConst.Code))
|
||||
AppConst.Code = ""
|
||||
|
|
Loading…
Reference in New Issue