From d04cddc0844143da8b188f30f491266f7f173cbc Mon Sep 17 00:00:00 2001 From: pengjunwu <1263019465@qq.com> Date: Fri, 12 Jan 2024 14:38:11 +0800 Subject: [PATCH] =?UTF-8?q?=E8=90=A5=E5=9C=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProjectNLD/Assets/Art/UI/Prefab/Camp.meta | 8 + .../Assets/Art/UI/Prefab/Camp/UI_Camp.prefab | 162 ++++++++++++++++++ .../Art/UI/Prefab/Camp/UI_Camp.prefab.meta | 7 + .../Scripts/Framework/UI/UIManager.Window.cs | 4 +- .../Gameplay/UI/UIBinder/UI_CampBinder.cs | 32 ++++ .../UI/UIBinder/UI_CampBinder.cs.meta | 11 ++ .../Scripts/Gameplay/UI/UI_CampController.cs | 58 +++++++ .../Gameplay/UI/UI_CampController.cs.meta | 11 ++ ProjectNLD/Assets/Scenes/CampScene.unity | 4 +- 9 files changed, 294 insertions(+), 3 deletions(-) create mode 100644 ProjectNLD/Assets/Art/UI/Prefab/Camp.meta create mode 100644 ProjectNLD/Assets/Art/UI/Prefab/Camp/UI_Camp.prefab create mode 100644 ProjectNLD/Assets/Art/UI/Prefab/Camp/UI_Camp.prefab.meta create mode 100644 ProjectNLD/Assets/Code/Scripts/Gameplay/UI/UIBinder/UI_CampBinder.cs create mode 100644 ProjectNLD/Assets/Code/Scripts/Gameplay/UI/UIBinder/UI_CampBinder.cs.meta create mode 100644 ProjectNLD/Assets/Code/Scripts/Gameplay/UI/UI_CampController.cs create mode 100644 ProjectNLD/Assets/Code/Scripts/Gameplay/UI/UI_CampController.cs.meta diff --git a/ProjectNLD/Assets/Art/UI/Prefab/Camp.meta b/ProjectNLD/Assets/Art/UI/Prefab/Camp.meta new file mode 100644 index 00000000000..4be1cb74c52 --- /dev/null +++ b/ProjectNLD/Assets/Art/UI/Prefab/Camp.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5fc70d1586ad4d348ab387fa42b7d18d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjectNLD/Assets/Art/UI/Prefab/Camp/UI_Camp.prefab b/ProjectNLD/Assets/Art/UI/Prefab/Camp/UI_Camp.prefab new file mode 100644 index 00000000000..fd563fd1c2f --- /dev/null +++ b/ProjectNLD/Assets/Art/UI/Prefab/Camp/UI_Camp.prefab @@ -0,0 +1,162 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &3170596210044094474 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4076313392852242653} + m_Layer: 5 + m_Name: UI_Camp + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4076313392852242653 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3170596210044094474} + 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: 5270348796142205963} + m_Father: {fileID: 0} + 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!1001 &643562100325951817 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 4076313392852242653} + m_Modifications: + - target: {fileID: 4740722626188776770, guid: 2ece976bb7b041640a969c074b3c7858, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4740722626188776770, guid: 2ece976bb7b041640a969c074b3c7858, + type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4740722626188776770, guid: 2ece976bb7b041640a969c074b3c7858, + type: 3} + propertyPath: m_AnchorMax.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4740722626188776770, guid: 2ece976bb7b041640a969c074b3c7858, + type: 3} + propertyPath: m_AnchorMax.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4740722626188776770, guid: 2ece976bb7b041640a969c074b3c7858, + type: 3} + propertyPath: m_AnchorMin.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4740722626188776770, guid: 2ece976bb7b041640a969c074b3c7858, + type: 3} + propertyPath: m_AnchorMin.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4740722626188776770, guid: 2ece976bb7b041640a969c074b3c7858, + type: 3} + propertyPath: m_SizeDelta.x + value: 455.93005 + objectReference: {fileID: 0} + - target: {fileID: 4740722626188776770, guid: 2ece976bb7b041640a969c074b3c7858, + type: 3} + propertyPath: m_SizeDelta.y + value: 127.100006 + objectReference: {fileID: 0} + - target: {fileID: 4740722626188776770, guid: 2ece976bb7b041640a969c074b3c7858, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4740722626188776770, guid: 2ece976bb7b041640a969c074b3c7858, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4740722626188776770, guid: 2ece976bb7b041640a969c074b3c7858, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4740722626188776770, guid: 2ece976bb7b041640a969c074b3c7858, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4740722626188776770, guid: 2ece976bb7b041640a969c074b3c7858, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4740722626188776770, guid: 2ece976bb7b041640a969c074b3c7858, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4740722626188776770, guid: 2ece976bb7b041640a969c074b3c7858, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4740722626188776770, guid: 2ece976bb7b041640a969c074b3c7858, + type: 3} + propertyPath: m_AnchoredPosition.x + value: -657 + objectReference: {fileID: 0} + - target: {fileID: 4740722626188776770, guid: 2ece976bb7b041640a969c074b3c7858, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 396 + objectReference: {fileID: 0} + - target: {fileID: 4740722626188776770, guid: 2ece976bb7b041640a969c074b3c7858, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4740722626188776770, guid: 2ece976bb7b041640a969c074b3c7858, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4740722626188776770, guid: 2ece976bb7b041640a969c074b3c7858, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8687545733931836314, guid: 2ece976bb7b041640a969c074b3c7858, + type: 3} + propertyPath: m_Name + value: Button_Back + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 2ece976bb7b041640a969c074b3c7858, type: 3} +--- !u!224 &5270348796142205963 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 4740722626188776770, guid: 2ece976bb7b041640a969c074b3c7858, + type: 3} + m_PrefabInstance: {fileID: 643562100325951817} + m_PrefabAsset: {fileID: 0} diff --git a/ProjectNLD/Assets/Art/UI/Prefab/Camp/UI_Camp.prefab.meta b/ProjectNLD/Assets/Art/UI/Prefab/Camp/UI_Camp.prefab.meta new file mode 100644 index 00000000000..857ff1f3c38 --- /dev/null +++ b/ProjectNLD/Assets/Art/UI/Prefab/Camp/UI_Camp.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 90ad38392f4a0fe40a67355da8eb0fc5 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjectNLD/Assets/Code/Scripts/Framework/UI/UIManager.Window.cs b/ProjectNLD/Assets/Code/Scripts/Framework/UI/UIManager.Window.cs index 4537c6fe5de..f8c300c5b6c 100644 --- a/ProjectNLD/Assets/Code/Scripts/Framework/UI/UIManager.Window.cs +++ b/ProjectNLD/Assets/Code/Scripts/Framework/UI/UIManager.Window.cs @@ -69,7 +69,8 @@ public partial class UIManager _WindowMeta(UINameConst.UI_GetItemWindow, UIWindowLayer.Normal); _WindowMeta(UINameConst.UINoticeOne, UIWindowLayer.Tips); _WindowMeta(UINameConst.UI_PVPMain,UIWindowLayer.Normal); - _WindowMeta(UINameConst.UIMissionWin,UIWindowLayer.Normal); + _WindowMeta(UINameConst.UIMissionWin,UIWindowLayer.Normal); + _WindowMeta(UINameConst.UI_Camp,UIWindowLayer.Normal); } @@ -158,4 +159,5 @@ public static class UINameConst public static readonly string UI_Purchase = "Interface/Shop/UI_Purchase"; public static readonly string UI_GetItemWindow= "Interface/Shop/UI_GetItemWindow"; public static readonly string UI_PVPMain = "PVP/UI_PVPMain"; + public static readonly string UI_Camp = "Camp/UI_Camp"; } \ No newline at end of file diff --git a/ProjectNLD/Assets/Code/Scripts/Gameplay/UI/UIBinder/UI_CampBinder.cs b/ProjectNLD/Assets/Code/Scripts/Gameplay/UI/UIBinder/UI_CampBinder.cs new file mode 100644 index 00000000000..3ed8bc35e6e --- /dev/null +++ b/ProjectNLD/Assets/Code/Scripts/Gameplay/UI/UIBinder/UI_CampBinder.cs @@ -0,0 +1,32 @@ +using System.Collections; +using System.Collections.Generic; +using TMPro; +using Framework; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.UIElements; +using Button = UnityEngine.UI.Button; +using Image = UnityEngine.UI.Image; +using Toggle = UnityEngine.UI.Toggle; +using ScrollView = PhxhSDK.PhxhScrollView; + +public class UI_CampBinder +{ + + public static void GetComponents(UI_CampController window) + { + window.Button_Back = window.GetComponent