diff --git a/Assets/ResWork/UI_Prefab/ProfileCard.prefab b/Assets/ResWork/UI_Prefab/ProfileCard.prefab index 98e5e1b..107a16d 100644 --- a/Assets/ResWork/UI_Prefab/ProfileCard.prefab +++ b/Assets/ResWork/UI_Prefab/ProfileCard.prefab @@ -699,7 +699,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &4535918963374782489 RectTransform: m_ObjectHideFlags: 0 @@ -716,9 +716,9 @@ RectTransform: - {fileID: 3791339997130780501} m_Father: {fileID: 2198343314357404905} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 588.5, y: 266} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: 0, y: 266} m_SizeDelta: {x: 351, y: 97} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &1792502777831041980 @@ -1283,7 +1283,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &2193820590508799635 RectTransform: m_ObjectHideFlags: 0 @@ -1300,10 +1300,10 @@ RectTransform: - {fileID: 3000119830228025488} m_Father: {fileID: 2198343314357404905} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 228, y: 266} - m_SizeDelta: {x: 323.23, y: 97} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: 0, y: 266} + m_SizeDelta: {x: 323.22998, y: 97} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &8481785666254178731 CanvasRenderer: @@ -1431,7 +1431,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &5404220870936619555 RectTransform: m_ObjectHideFlags: 0 @@ -1578,7 +1578,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &1587256608825020144 RectTransform: m_ObjectHideFlags: 0 @@ -1725,7 +1725,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &3180898226814736061 RectTransform: m_ObjectHideFlags: 0 @@ -2204,6 +2204,7 @@ MonoBehaviour: go_viewbtn: {fileID: 4007246598957671079} go_albumbtn: {fileID: 6118212189904897713} go_chatbtn: {fileID: 6488644166046883144} + go_changegirl: {fileID: 687796067331381646} rect: {fileID: 0} mat_Gray: {fileID: 2100000, guid: 7701c15f96b443d408ac83222c9b869a, type: 2} --- !u!1 &8512964498684640329 diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index 16bd7e4..6cf4f69 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -2784,7 +2784,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0} m_AnchorMax: {x: 0.5, y: 0} - m_AnchoredPosition: {x: 2756, y: -25} + m_AnchoredPosition: {x: 2756, y: -25.000015} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!61 &85415561 @@ -10613,7 +10613,7 @@ MonoBehaviour: m_fontMaterials: [] m_fontColor32: serializedVersion: 2 - rgba: 4294967295 + rgba: 4293256191 m_fontColor: {r: 1, g: 0.8901961, b: 0.8980392, a: 1} m_enableVertexGradient: 0 m_colorMode: 3 @@ -12596,15 +12596,15 @@ RectTransform: m_GameObject: {fileID: 325580662} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.6, y: 0.6, z: 0.6} + m_LocalScale: {x: 0.8, y: 0.8, z: 0.8} m_ConstrainProportionsScale: 1 m_Children: [] m_Father: {fileID: 168358558} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0.5} m_AnchorMax: {x: 0, y: 0.5} - m_AnchoredPosition: {x: 93, y: 0} - m_SizeDelta: {x: 116, y: 121} + m_AnchoredPosition: {x: 75, y: 0} + m_SizeDelta: {x: 81, y: 73} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &325580664 MonoBehaviour: @@ -12626,7 +12626,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: af3bdea9ab9e8d4449e22d0d23d27f92, type: 3} + m_Sprite: {fileID: 21300000, guid: f4d57aa29e495ec49bedde143bf86da1, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -15865,7 +15865,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0} m_AnchorMax: {x: 0.5, y: 0} - m_AnchoredPosition: {x: -2756, y: -25} + m_AnchoredPosition: {x: -2756, y: -25.000015} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!61 &420248622 @@ -26135,8 +26135,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -186.2, y: -25.8} - m_SizeDelta: {x: 315, y: 80} + m_AnchoredPosition: {x: -260, y: -25.8} + m_SizeDelta: {x: 250, y: 80} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &690239857 MonoBehaviour: @@ -28666,8 +28666,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 157, y: -25.8} - m_SizeDelta: {x: 315, y: 80} + m_AnchoredPosition: {x: 0, y: -25.8} + m_SizeDelta: {x: 250, y: 80} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &791099212 MonoBehaviour: @@ -38308,7 +38308,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!224 &1035601637 RectTransform: m_ObjectHideFlags: 0 @@ -38327,8 +38327,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 248, y: -25.8} - m_SizeDelta: {x: 315, y: 80} + m_AnchoredPosition: {x: 260, y: -25.8} + m_SizeDelta: {x: 250, y: 80} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1035601638 MonoBehaviour: @@ -49047,15 +49047,15 @@ RectTransform: m_GameObject: {fileID: 1297640874} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.6, y: 0.6, z: 0.6} + m_LocalScale: {x: 0.7, y: 0.7, z: 0.7} m_ConstrainProportionsScale: 1 m_Children: [] m_Father: {fileID: 1918801481} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0.5} m_AnchorMax: {x: 0, y: 0.5} - m_AnchoredPosition: {x: 88, y: 0} - m_SizeDelta: {x: 116, y: 121} + m_AnchoredPosition: {x: 75, y: 0} + m_SizeDelta: {x: 115, y: 115} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1297640876 MonoBehaviour: @@ -49077,7 +49077,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 3d292f5288881c743b59b7c06859daa5, type: 3} + m_Sprite: {fileID: 21300000, guid: d2a4ae777ca469b4da6792c3895030bb, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -52148,7 +52148,7 @@ RectTransform: 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_AnchoredPosition: {x: 0, y: 163} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1357839140 @@ -62590,7 +62590,7 @@ RectTransform: 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: -55.772705} + m_AnchoredPosition: {x: 0, y: -55.77272} m_SizeDelta: {x: 0, y: -111.5455} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &1630921640 @@ -63155,7 +63155,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: "\uC218\uC9D1 \uAC8C\uC784" + m_text: "\uD589\uC6B4 \uBF51\uAE30" m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 3055b5c28f94e6c4ea6b9a379bb315a5, type: 2} m_sharedMaterial: {fileID: -3574565475228871172, guid: 3055b5c28f94e6c4ea6b9a379bb315a5, type: 2} @@ -65849,7 +65849,7 @@ RectTransform: m_Father: {fileID: 1081561983} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} @@ -78669,7 +78669,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 35.6, y: 24.6} + m_AnchoredPosition: {x: 35.600006, y: 24.599998} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &2029306903 @@ -80700,7 +80700,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &2079832696 RectTransform: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/UI/ChangeGirlUI.cs b/Assets/Scripts/UI/ChangeGirlUI.cs index bc21f14..4946dea 100644 --- a/Assets/Scripts/UI/ChangeGirlUI.cs +++ b/Assets/Scripts/UI/ChangeGirlUI.cs @@ -61,6 +61,7 @@ public class ChangeGirlUI : uScrollViewMgr SaveMgr.Ins.Set_SelectGirlID(m_SelectCard.Get_IntData()); Set_ScrollView(table_girl.Ins.Get_DataList()); + LobbyUI.Ins.m_LobbyCenterProfileUI.Set(); }); break; case "btn_buy_change": @@ -70,6 +71,7 @@ public class ChangeGirlUI : uScrollViewMgr SaveMgr.Ins.Set_SelectGirlID(m_SelectCard.Get_IntData()); Set_ScrollView(table_girl.Ins.Get_DataList()); + LobbyUI.Ins.m_LobbyCenterProfileUI.Set(); } break; } diff --git a/Assets/Scripts/UI/LobbyUI.cs b/Assets/Scripts/UI/LobbyUI.cs index 83efd98..1450b47 100644 --- a/Assets/Scripts/UI/LobbyUI.cs +++ b/Assets/Scripts/UI/LobbyUI.cs @@ -19,7 +19,7 @@ public class LobbyUI : MonoBehaviourSingletonTemplate public PopupUI m_PopupUI; [Header("Center UI")] - [SerializeField] LobbyCenterProfileUI m_LobbyCenterProfileUI; + public LobbyCenterProfileUI m_LobbyCenterProfileUI; public AlbumUI m_AlbumUI; [SerializeField] GachaUI m_GachaUI; public ChatUI m_ChatUI; diff --git a/Assets/Scripts/UI/ProfileCard.cs b/Assets/Scripts/UI/ProfileCard.cs index 62d82c0..941cdc3 100644 --- a/Assets/Scripts/UI/ProfileCard.cs +++ b/Assets/Scripts/UI/ProfileCard.cs @@ -7,7 +7,7 @@ public class ProfileCard : MonoBehaviour { public Image i_girl, i_openbtn; public TextMeshProUGUI[] texts; // 0 이름, 1 카운트 - public GameObject go_openbtn, go_viewbtn, go_albumbtn, go_chatbtn; + public GameObject go_openbtn, go_viewbtn, go_albumbtn, go_chatbtn, go_changegirl; public RectTransform rect; public Material mat_Gray; @@ -51,6 +51,12 @@ public class ProfileCard : MonoBehaviour go_albumbtn.SetActive(count > 0); go_chatbtn.SetActive(count > 0); //go_chatbtn.SetActive(false); // 게등위 테스트 + go_changegirl.SetActive(false); + if (SaveMgr.Ins.IsObtainGirl(2)) + { // 획득한 캐릭터 2종 이상 + if (SaveMgr.Ins.Get_SelectGirlID() != m_Data.n_GirlID) + go_changegirl.SetActive(count > 0); // 선택된 캐릭터가 아니며 획득한 캐릭인 경우 + } } bool CanOpen() @@ -66,12 +72,14 @@ public class ProfileCard : MonoBehaviour public void OnClick_Profile() { - LobbyUI.Ins.Show_Profile(m_Data.n_GirlID); + if (m_Data != null) + LobbyUI.Ins.Show_Profile(m_Data.n_GirlID); } public void OnClick_Chat() { - LobbyUI.Ins.m_ChatUI.Set(m_Data); + if (m_Data != null) + LobbyUI.Ins.m_ChatUI.Set(m_Data); } public void OnClick_Preview() @@ -113,6 +121,7 @@ public class ProfileCard : MonoBehaviour public void OnClick_Album() { - LobbyUI.Ins.Go_Album(m_Data.n_GirlID); + if (m_Data != null) + LobbyUI.Ins.Go_Album(m_Data.n_GirlID); } } \ No newline at end of file