From e5f497a16344c7ba7fa42e6bc32189bf62de3b0d Mon Sep 17 00:00:00 2001 From: "ALIENJACK\\alien" Date: Mon, 28 Apr 2025 11:58:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=98=E6=A1=A3=E4=BA=91=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E7=8A=B6=E6=80=81UI=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Resources/UIPrefabs/OptionUI.prefab | 392 +++++++++++++++++- .../AppMain/UI/Tools/DotweenRotation.cs | 53 +++ .../AppMain/UI/Tools/DotweenRotation.cs.meta | 2 + 3 files changed, 431 insertions(+), 16 deletions(-) create mode 100644 AxibugEmuOnline.Client/Assets/Script/AppMain/UI/Tools/DotweenRotation.cs create mode 100644 AxibugEmuOnline.Client/Assets/Script/AppMain/UI/Tools/DotweenRotation.cs.meta diff --git a/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/OptionUI.prefab b/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/OptionUI.prefab index 94f5a72d..232826e5 100644 --- a/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/OptionUI.prefab +++ b/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/OptionUI.prefab @@ -648,6 +648,81 @@ MonoBehaviour: m_FlexibleWidth: 1 m_FlexibleHeight: -1 m_LayoutPriority: 1 +--- !u!1 &1601163034082482360 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2303902335643923373} + - component: {fileID: 7825136160635457043} + - component: {fileID: 2505159117998551519} + m_Layer: 5 + m_Name: Conflict + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2303902335643923373 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1601163034082482360} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 905458728127029103} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 50, y: 50} + m_Pivot: {x: 0, y: 0} +--- !u!222 &7825136160635457043 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1601163034082482360} + m_CullTransparentMesh: 1 +--- !u!114 &2505159117998551519 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1601163034082482360} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 994c93ed03dadee49974aebf3cb5365d, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!1 &1731066637017514641 GameObject: m_ObjectHideFlags: 0 @@ -869,6 +944,45 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 +--- !u!1 &2040328582144336713 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 905458728127029103} + m_Layer: 5 + m_Name: StateNode + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &905458728127029103 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2040328582144336713} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3539783812791358836} + - {fileID: 6030618878828304669} + - {fileID: 2303902335643923373} + - {fileID: 8677023902282266940} + m_Father: {fileID: 5970282275929291192} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 5, y: 5} + m_SizeDelta: {x: -10, y: -10} + m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &2471254561136382013 GameObject: m_ObjectHideFlags: 0 @@ -1023,6 +1137,81 @@ MonoBehaviour: m_Icon: {fileID: 394891843266770919} ExpandFlag: {fileID: 1501213187178026014} ApplyFlag: {fileID: 3335801350916860509} +--- !u!1 &2637678715180681658 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8677023902282266940} + - component: {fileID: 6387250980529666459} + - component: {fileID: 6242848023853370498} + m_Layer: 5 + m_Name: Synced + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8677023902282266940 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2637678715180681658} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 905458728127029103} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 50, y: 50} + m_Pivot: {x: 0, y: 0} +--- !u!222 &6387250980529666459 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2637678715180681658} + m_CullTransparentMesh: 1 +--- !u!114 &6242848023853370498 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2637678715180681658} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 28db37d78cad20f4397804dfa4572829, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!1 &2660711182228429640 GameObject: m_ObjectHideFlags: 0 @@ -1188,10 +1377,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 1100500336380202360} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 170, y: -333} + m_SizeDelta: {x: 300, y: 26} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &7910447946506517051 CanvasRenderer: @@ -1253,6 +1442,97 @@ MonoBehaviour: m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} m_EffectDistance: {x: 1.5, y: -1.5} m_UseGraphicAlpha: 1 +--- !u!1 &4078965612622303339 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6030618878828304669} + - component: {fileID: 6018890508858230420} + - component: {fileID: 1865219663044263670} + - component: {fileID: 6562970432720184454} + m_Layer: 5 + m_Name: Syncing + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6030618878828304669 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4078965612622303339} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 905458728127029103} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 50, y: 50} + m_Pivot: {x: 0, y: 0} +--- !u!222 &6018890508858230420 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4078965612622303339} + m_CullTransparentMesh: 1 +--- !u!114 &1865219663044263670 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4078965612622303339} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: c5a9535bb63e1f14f9a1528566864ab2, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &6562970432720184454 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4078965612622303339} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8707b921aaba60d45b4041e96f3542dd, type: 3} + m_Name: + m_EditorClassIdentifier: + m_duration: 2 + m_ease: 1 + m_reverseRotation: 1 --- !u!1 &4124172888520656882 GameObject: m_ObjectHideFlags: 0 @@ -1384,12 +1664,13 @@ RectTransform: - {fileID: 7389645496847632176} - {fileID: 173892651193427531} - {fileID: 8150810211498757695} + - {fileID: 905458728127029103} m_Father: {fileID: 1100500336380202360} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 170, y: -160} + m_SizeDelta: {x: 300, y: 300} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &2558056583130529771 MonoBehaviour: @@ -1522,8 +1803,8 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_IgnoreLayout: 1 - m_MinWidth: 300 - m_MinHeight: -1 + m_MinWidth: -1 + m_MinHeight: 1080 m_PreferredWidth: -1 m_PreferredHeight: -1 m_FlexibleWidth: -1 @@ -2743,6 +3024,81 @@ MonoBehaviour: m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} m_EffectDistance: {x: 1.5, y: -1.5} m_UseGraphicAlpha: 1 +--- !u!1 &6998836277133601669 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3539783812791358836} + - component: {fileID: 6969397185295608833} + - component: {fileID: 5170828039250978253} + m_Layer: 5 + m_Name: Disconnect + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3539783812791358836 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6998836277133601669} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 905458728127029103} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 50, y: 50} + m_Pivot: {x: 0, y: 0} +--- !u!222 &6969397185295608833 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6998836277133601669} + m_CullTransparentMesh: 1 +--- !u!114 &5170828039250978253 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6998836277133601669} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 630c435b903e3dc4e80038c0a531162d, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!1 &7099541800602849681 GameObject: m_ObjectHideFlags: 0 @@ -2760,7 +3116,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &1100500336380202360 RectTransform: m_ObjectHideFlags: 0 @@ -2778,10 +3134,10 @@ RectTransform: - {fileID: 6878964193873653430} m_Father: {fileID: 4478785627166277610} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 165, y: -443} + m_SizeDelta: {x: 330, y: 356} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &20405450890320071 MonoBehaviour: @@ -2803,7 +3159,7 @@ MonoBehaviour: m_ChildAlignment: 0 m_Spacing: 10 m_ChildForceExpandWidth: 1 - m_ChildForceExpandHeight: 1 + m_ChildForceExpandHeight: 0 m_ChildControlWidth: 1 m_ChildControlHeight: 1 m_ChildScaleWidth: 0 @@ -2826,6 +3182,10 @@ MonoBehaviour: UI_ScreenShot: {fileID: 1024458178917207864} UI_Empty: {fileID: 8350228378118296958} UI_SavTime: {fileID: 13043593624240728} + UI_Disconnect: {fileID: 6998836277133601669} + UI_Syncing: {fileID: 4078965612622303339} + UI_Conflict: {fileID: 1601163034082482360} + UI_Synced: {fileID: 2637678715180681658} --- !u!1 &7141318786199574664 GameObject: m_ObjectHideFlags: 0 diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/Tools/DotweenRotation.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/Tools/DotweenRotation.cs new file mode 100644 index 00000000..c2a5fe28 --- /dev/null +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/Tools/DotweenRotation.cs @@ -0,0 +1,53 @@ +using DG.Tweening; +using DG.Tweening.Core; +using DG.Tweening.Plugins.Options; +using UnityEngine; + +namespace AxibugEmuOnline.Client.Tools +{ + public class DotweenRotation : MonoBehaviour + { + [SerializeField] + float m_duration = 1f; + [SerializeField] + Ease m_ease = Ease.Linear; + [SerializeField] + bool m_reverseRotation; + + private TweenerCore m_tween; + + void OnEnable() + { + Restart(); + } + + private void Restart() + { + if (m_tween != null) + { + m_tween.Kill(); + m_tween = null; + } + + transform.localRotation = Quaternion.identity; + m_tween = transform.DOLocalRotate(new Vector3(0, 0, 360f * (m_reverseRotation ? -1 : 1)), m_duration, RotateMode.LocalAxisAdd) + .SetEase(m_ease) + .SetLoops(-1); + m_tween.SetLink(gameObject); + } + + private void OnDisable() + { + if (m_tween != null) + { + m_tween.Kill(); + m_tween = null; + } + } + + private void OnValidate() + { + Restart(); + } + } +} diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/Tools/DotweenRotation.cs.meta b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/Tools/DotweenRotation.cs.meta new file mode 100644 index 00000000..39060b1f --- /dev/null +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/Tools/DotweenRotation.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 8707b921aaba60d45b4041e96f3542dd \ No newline at end of file