From ebc25c401d8c9186d490847e08abb40ed3c2d9b5 Mon Sep 17 00:00:00 2001 From: hevinci Date: Sat, 26 Nov 2022 15:09:12 +0800 Subject: [PATCH] update sample --- .../GameRes/UIPanel/UIHome.prefab | 79 +++++++++++++++++++ .../Runtime/BattleLogic/BattleRoom.cs | 2 - .../Runtime/GameLogic/FsmNode/FsmSceneHome.cs | 1 - .../Runtime/UIWindow/UIHomeWindow.cs | 6 ++ 4 files changed, 85 insertions(+), 3 deletions(-) diff --git a/Assets/YooAsset/Samples~/Space Shooter/GameRes/UIPanel/UIHome.prefab b/Assets/YooAsset/Samples~/Space Shooter/GameRes/UIPanel/UIHome.prefab index ff25f71..2353a96 100644 --- a/Assets/YooAsset/Samples~/Space Shooter/GameRes/UIPanel/UIHome.prefab +++ b/Assets/YooAsset/Samples~/Space Shooter/GameRes/UIPanel/UIHome.prefab @@ -1,5 +1,83 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: +--- !u!1 &2894094678118443804 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3005946438868630613} + - component: {fileID: 4741618138862755453} + - component: {fileID: 2950043487044765300} + m_Layer: 5 + m_Name: version + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3005946438868630613 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2894094678118443804} + 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: 4142826567245113224} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: -136.19, y: 84.1} + m_SizeDelta: {x: 272.37756, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &4741618138862755453 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2894094678118443804} + m_CullTransparentMesh: 0 +--- !u!114 &2950043487044765300 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2894094678118443804} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 8297a2bf97dbbba468bd2518d003a876, type: 3} + m_FontSize: 22 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 'Ver : 2022/xx/xx-xxxx' --- !u!1 &3580699901832812969 GameObject: m_ObjectHideFlags: 0 @@ -150,6 +228,7 @@ RectTransform: m_Children: - {fileID: 3112899034949946423} - {fileID: 2165109262903650435} + - {fileID: 3005946438868630613} m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/BattleLogic/BattleRoom.cs b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/BattleLogic/BattleRoom.cs index c572240..7e28b20 100644 --- a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/BattleLogic/BattleRoom.cs +++ b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/BattleLogic/BattleRoom.cs @@ -59,8 +59,6 @@ public class BattleRoom /// public void DestroyRoom() { - Debug.LogWarning("DestroyRoom"); - if (_musicHandle != null) _musicHandle.Release(); diff --git a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/GameLogic/FsmNode/FsmSceneHome.cs b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/GameLogic/FsmNode/FsmSceneHome.cs index cbdea4e..3260bef 100644 --- a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/GameLogic/FsmNode/FsmSceneHome.cs +++ b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/GameLogic/FsmNode/FsmSceneHome.cs @@ -31,7 +31,6 @@ internal class FsmSceneHome : IStateNode private IEnumerator Prepare() { - Debug.LogWarning("LoadScene Home"); yield return YooAssets.LoadSceneAsync("scene_home"); yield return UniWindow.OpenWindowAsync("UIHome"); yield return new WaitForSeconds(0.5f); diff --git a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/UIWindow/UIHomeWindow.cs b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/UIWindow/UIHomeWindow.cs index 3e243ea..4867188 100644 --- a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/UIWindow/UIHomeWindow.cs +++ b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/UIWindow/UIHomeWindow.cs @@ -7,8 +7,12 @@ using UniFramework.Window; [WindowAttribute(100, false)] public class UIHomeWindow : UIWindow { + private Text _version; + public override void OnCreate() { + _version = this.transform.Find("version").GetComponent(); + var loginBtn = this.transform.Find("Start").GetComponent