From b669ec160a2090fec3ed6a30c3aea157fd2791ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=ED=8C=90=EB=8F=8C?= Date: Thu, 22 Aug 2024 19:04:27 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9E=98=EB=AA=BB=EB=90=9C=20=EC=8B=9C?= =?UTF-8?q?=EC=8A=A4=ED=85=9C=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Client/Assets/0_Scenes/Game.unity | 14 ++++++++++- Client/Assets/0_Scenes/Play.unity | 24 ++++++++++--------- Client/Assets/1_Script/GameUI/StoryUiCtrl.cs | 8 +++++-- Client/Assets/1_Script/MainCtrl.cs | 18 +++++++------- .../Assets/1_Script/System/Http/Protocol.cs | 1 + Client/Assets/1_Script/System/ItemManager.cs | 2 -- Client/Assets/1_Script/System/Statics.cs | 4 ++-- 7 files changed, 45 insertions(+), 26 deletions(-) diff --git a/Client/Assets/0_Scenes/Game.unity b/Client/Assets/0_Scenes/Game.unity index 8f4e8e3f..febe6e7a 100644 --- a/Client/Assets/0_Scenes/Game.unity +++ b/Client/Assets/0_Scenes/Game.unity @@ -6673,7 +6673,19 @@ MonoBehaviour: m_IntArgument: 0 m_FloatArgument: 0 m_StringArgument: - m_BoolArgument: 1 + m_BoolArgument: 0 + m_CallState: 2 + - m_Target: {fileID: 1699950333} + m_TargetAssemblyTypeName: StoryUiCtrl, Assembly-CSharp + m_MethodName: testButton + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 m_CallState: 2 --- !u!114 &440143456 MonoBehaviour: diff --git a/Client/Assets/0_Scenes/Play.unity b/Client/Assets/0_Scenes/Play.unity index 9998f417..43dc8c54 100644 --- a/Client/Assets/0_Scenes/Play.unity +++ b/Client/Assets/0_Scenes/Play.unity @@ -13888,7 +13888,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!114 &2330720395909538063 MonoBehaviour: m_ObjectHideFlags: 0 @@ -13903,8 +13903,10 @@ MonoBehaviour: m_EditorClassIdentifier: iUnit: {fileID: 6975796988758163051} iUnitNickname: {fileID: 5127557828549460664} + iUnitImage: {fileID: 7982507254516978407} youUnit: {fileID: 37635086790962674} youUnitNickname: {fileID: 6831365340785763945} + youUnitImage: {fileID: 4711687304681685242} scriptText: {fileID: 6037302274294790102} --- !u!1 &2554568632941243214 GameObject: @@ -14157,7 +14159,7 @@ RectTransform: m_AnchorMin: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 0} m_AnchoredPosition: {x: 30, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_SizeDelta: {x: 146.01001, y: 63.91} m_Pivot: {x: 0, y: 0} --- !u!114 &5127557828549460664 MonoBehaviour: @@ -14299,7 +14301,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: -30, y: 0.000030517578} - m_SizeDelta: {x: 0, y: 0} + m_SizeDelta: {x: 146.01001, y: 63.91} m_Pivot: {x: 1, y: 0} --- !u!114 &6037302274294790102 MonoBehaviour: @@ -14740,10 +14742,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 4848356131037571491} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 73.005005, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 73.005005, y: -31.955} + m_SizeDelta: {x: 116.01, y: 33.91} m_Pivot: {x: 0.5, y: 0.5} --- !u!224 &8383471597735064555 RectTransform: @@ -14797,10 +14799,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 5620797552056137420} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 73.005005, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 73.005005, y: -31.955} + m_SizeDelta: {x: 116.01, y: 33.91} m_Pivot: {x: 0.5, y: 0.5} --- !u!224 &8772798237890598308 RectTransform: diff --git a/Client/Assets/1_Script/GameUI/StoryUiCtrl.cs b/Client/Assets/1_Script/GameUI/StoryUiCtrl.cs index fff355ba..308f64a2 100644 --- a/Client/Assets/1_Script/GameUI/StoryUiCtrl.cs +++ b/Client/Assets/1_Script/GameUI/StoryUiCtrl.cs @@ -1,4 +1,5 @@ using UnityEngine; +using static GameManager; public class StoryUiCtrl : SingletonMonoBehaviour { @@ -8,11 +9,14 @@ public class StoryUiCtrl : SingletonMonoBehaviour protected override void OnStart() { - foreach(var item in Statics.excelDatas.storyData) + foreach (var item in Statics.excelDatas.storyData) { StoryPrefab storyPrefab = Instantiate(itemPrefab, itemContent).GetComponent(); storyPrefab.Set(item.Value); } - + } + public void testButton() + { + GameManager.Instance.NextScene(eScene.Play); } } diff --git a/Client/Assets/1_Script/MainCtrl.cs b/Client/Assets/1_Script/MainCtrl.cs index a939fef6..08900b69 100644 --- a/Client/Assets/1_Script/MainCtrl.cs +++ b/Client/Assets/1_Script/MainCtrl.cs @@ -120,7 +120,7 @@ public class MainCtrl : MonoBehaviour if (data.status.Equals(200)) { PlayerPrefs.SetString("uuid", data.uuid); - Statics.uuid = data.uuid; + Statics.uuid = data.session; Statics.deck_info = data.deck_info.OrderBy(n => n.id).ToList(); //´ÙÀ̳ª¹Í µ¥ÀÌÅÍ Set foreach (var item in data.dynamic_data) @@ -132,11 +132,6 @@ public class MainCtrl : MonoBehaviour Statics.gold = data.gold; Statics.cash = data.cash; - if (data.new_user) //½Å±Ô À¯Àú - GameManager.Instance.NextScene(GameManager.eScene.Play); - else - GameManager.Instance.NextScene(GameManager.eScene.Game); - //»óÁ¡ µ¥ÀÌÅÍ foreach (var item in Statics.excelDatas.shopItemData) { @@ -169,7 +164,15 @@ public class MainCtrl : MonoBehaviour Statics.shopItems.Add(itemData.index, itemData); } - + if (data.new_user) //½Å±Ô À¯Àú + GameManager.Instance.NextScene(GameManager.eScene.Play); + else + GameManager.Instance.NextScene(GameManager.eScene.Game); + } + else if (data.status.Equals(502)) + { + Debug.Log("¼¼¼Ç¸¸·á"); + Application.Quit(); } else { @@ -178,7 +181,6 @@ public class MainCtrl : MonoBehaviour } }, () => { - }); diff --git a/Client/Assets/1_Script/System/Http/Protocol.cs b/Client/Assets/1_Script/System/Http/Protocol.cs index b0ceb583..24844059 100644 --- a/Client/Assets/1_Script/System/Http/Protocol.cs +++ b/Client/Assets/1_Script/System/Http/Protocol.cs @@ -64,6 +64,7 @@ public class LoginResp : Request { private Protocol protocol = Protocol.Login; public string uuid { get; set; } + public string session { get; set; } public string nickname { get; set; } public uint gold { get; set; } public uint cash { get; set; } diff --git a/Client/Assets/1_Script/System/ItemManager.cs b/Client/Assets/1_Script/System/ItemManager.cs index 9a8f2122..e3ac3b10 100644 --- a/Client/Assets/1_Script/System/ItemManager.cs +++ b/Client/Assets/1_Script/System/ItemManager.cs @@ -1,7 +1,5 @@ using System.Collections.Generic; using System.Linq; -using Unity.VisualScripting; -using static UnityEditor.Progress; public class ItemManager { diff --git a/Client/Assets/1_Script/System/Statics.cs b/Client/Assets/1_Script/System/Statics.cs index b5c6e22c..b6a9ccd1 100644 --- a/Client/Assets/1_Script/System/Statics.cs +++ b/Client/Assets/1_Script/System/Statics.cs @@ -5,8 +5,8 @@ using UnityEngine.UI; public class Statics { #if UNITY_EDITOR - public static readonly string url = "https://127.0.0.1:4860"; - //public static readonly string url = "https://game.pandoli365.com"; + //public static readonly string url = "https://localhost:4860"; + public static readonly string url = "https://game.pandoli365.com"; #else public static readonly string url = "https://game.pandoli365.com"; #endif