diff --git a/Assets/ResWork/UIPrefabs/InGame/IngamePetCard.prefab b/Assets/ResWork/UIPrefabs/InGame/IngamePetCard.prefab index 2ed4c4d88..89dc1d42f 100644 --- a/Assets/ResWork/UIPrefabs/InGame/IngamePetCard.prefab +++ b/Assets/ResWork/UIPrefabs/InGame/IngamePetCard.prefab @@ -576,6 +576,66 @@ MonoBehaviour: m_FillOrigin: 2 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 +--- !u!1 &5710555290477746323 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6685550052984212000} + - component: {fileID: 726009010351437863} + m_Layer: 5 + m_Name: grid_buffdebuff + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6685550052984212000 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5710555290477746323} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.7, y: 0.7, z: 0.7} + m_ConstrainProportionsScale: 1 + m_Children: [] + m_Father: {fileID: 1303839936856560027} + 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: -34.2, y: -89.2} + m_SizeDelta: {x: 51, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &726009010351437863 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5710555290477746323} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8a8695521f0d02e499659fee002a26c2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_StartCorner: 0 + m_StartAxis: 0 + m_CellSize: {x: 51, y: 51} + m_Spacing: {x: 5, y: 5} + m_Constraint: 1 + m_ConstraintCount: 3 --- !u!1 &6957816333201879133 GameObject: m_ObjectHideFlags: 0 @@ -586,6 +646,7 @@ GameObject: m_Component: - component: {fileID: 1303839936856560027} - component: {fileID: 2437459072261602851} + - component: {fileID: 3031892410646379827} m_Layer: 5 m_Name: IngamePetCard m_TagString: Untagged @@ -613,6 +674,7 @@ RectTransform: - {fileID: 6585263534833399476} - {fileID: 4242632587874139151} - {fileID: 2066034075942729184} + - {fileID: 6685550052984212000} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 0} @@ -643,6 +705,22 @@ MonoBehaviour: - {fileID: 8744080277100484966} - {fileID: 1131690825878101170} slider_hp: {fileID: 2829501000363712437} + m_IngameBuffDebuffBase: {fileID: 3031892410646379827} +--- !u!114 &3031892410646379827 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6957816333201879133} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 79b2432502e7b4f40aa98039dd43febe, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ScrollRect: {fileID: 0} + m_Content: {fileID: 5710555290477746323} + go_card: {fileID: 1568274442747495661, guid: 9a3ef2c7c45c3b04fa5b3d37418cd361, type: 3} --- !u!1 &8128196453817547961 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Res_Addr/MainUI/NewGameUI.prefab b/Assets/Res_Addr/MainUI/NewGameUI.prefab index 9b8eba731..3a35c9add 100644 --- a/Assets/Res_Addr/MainUI/NewGameUI.prefab +++ b/Assets/Res_Addr/MainUI/NewGameUI.prefab @@ -104578,6 +104578,7 @@ GameObject: m_Component: - component: {fileID: 3764310506534080148} - component: {fileID: 389072258464090254} + - component: {fileID: 3077886675301288154} m_Layer: 5 m_Name: MyInfoUI m_TagString: Untagged @@ -104629,11 +104630,9 @@ MonoBehaviour: m_content: - {fileID: 2831895023035487834} - {fileID: 8162699013497819267} - - {fileID: 1400472963099907056} go_card: - {fileID: 1249779519052861029, guid: 1c5227ecba07b514f921839634d96a65, type: 3} - {fileID: 1568274442747495661, guid: a9dc9c931b5d4844f9a9e7879fb4ba41, type: 3} - - {fileID: 1568274442747495661, guid: 9a3ef2c7c45c3b04fa5b3d37418cd361, type: 3} sprites: - {fileID: 1700882581535685601} - {fileID: 8357719897097132384} @@ -104648,6 +104647,22 @@ MonoBehaviour: - {fileID: 1818283761846774502} - {fileID: 6971928542919759379} - {fileID: 12548458969975031} + m_IngameBuffDebuffBase: {fileID: 3077886675301288154} +--- !u!114 &3077886675301288154 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8663632983482600393} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 79b2432502e7b4f40aa98039dd43febe, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ScrollRect: {fileID: 0} + m_Content: {fileID: 1400472963099907056} + go_card: {fileID: 1568274442747495661, guid: 9a3ef2c7c45c3b04fa5b3d37418cd361, type: 3} --- !u!1 &8669924406722207843 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Script/Character/Actor.cs b/Assets/Script/Character/Actor.cs index 879600b70..0f68a2736 100644 --- a/Assets/Script/Character/Actor.cs +++ b/Assets/Script/Character/Actor.cs @@ -1227,7 +1227,9 @@ public class Actor : MyCoroutine void Set_IngameBuffDebuffUI(SkillTypeConfigTableData skillExtraData, float time) { if (MyInfoUI.isIns && IsRole(eRole.PC)) - MyInfoUI.Ins.Add_IngameBuffDebuff(skillExtraData.s_SkillNoticeIconPath, time); + MyInfoUI.Ins.m_IngameBuffDebuffBase.Add_IngameBuffDebuff(skillExtraData.s_SkillNoticeIconPath, time); + else if (IngamePetCard.isIns && IsRole(eRole.Pet)) + IngamePetCard.Ins.m_IngameBuffDebuffBase.Add_IngameBuffDebuff(skillExtraData.s_SkillNoticeIconPath, time); } public void Check_EnchantOption(DamageInfo _dinfo, bool whenhit = true) { diff --git a/Assets/Script/UI/Base/CardCoolTimeBase.cs b/Assets/Script/UI/Base/CardCoolTimeBase.cs index cafa92c8c..6c7a1ec35 100644 --- a/Assets/Script/UI/Base/CardCoolTimeBase.cs +++ b/Assets/Script/UI/Base/CardCoolTimeBase.cs @@ -1,5 +1,3 @@ -using System.Collections; -using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.UI; diff --git a/Assets/Script/UI/Ingame/IngameBuffDebuffBase.cs b/Assets/Script/UI/Ingame/IngameBuffDebuffBase.cs new file mode 100644 index 000000000..d0f7dc46a --- /dev/null +++ b/Assets/Script/UI/Ingame/IngameBuffDebuffBase.cs @@ -0,0 +1,34 @@ +using System.Collections.Generic; + +public class IngameBuffDebuffBase : uScrollViewMgr +{ + List list_buffDebuffDatas = new List(); + + public void AllOff() + { + CardBase_AllOff(); + } + + private void OnEnable() + { + AllOff(); + } + + public void Add_IngameBuffDebuff(string icon, float time) + { + bool add = false; + for (int i = 0; i < list_buffDebuffDatas.Count; i++) + { + if (list_buffDebuffDatas[i].s_Icon.Equals(icon)) + { + add = true; + list_buffDebuffDatas[i].f_Time = time; + break; + } + } + + if (!add) list_buffDebuffDatas.Add(new IngameBuffDebuffData { s_Icon = icon, f_Time = time }); + + Set_ScrollView(list_buffDebuffDatas); + } +} \ No newline at end of file diff --git a/Assets/Script/UI/Ingame/IngameBuffDebuffBase.cs.meta b/Assets/Script/UI/Ingame/IngameBuffDebuffBase.cs.meta new file mode 100644 index 000000000..0777d6c47 --- /dev/null +++ b/Assets/Script/UI/Ingame/IngameBuffDebuffBase.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 79b2432502e7b4f40aa98039dd43febe +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Script/UI/Pet/IngamePetCard.cs b/Assets/Script/UI/Pet/IngamePetCard.cs index 8a7c8a9f9..d6b7d7ac1 100644 --- a/Assets/Script/UI/Pet/IngamePetCard.cs +++ b/Assets/Script/UI/Pet/IngamePetCard.cs @@ -3,14 +3,24 @@ using UnityEngine.UI; public class IngamePetCard : CardCoolTimeBase { + public static IngamePetCard Ins; + public static bool isIns; + public Image[] sprites; // 0 등급, 1 아이콘, 2 공격타입bg, 3 공격타입, 4 쿨타임, 5 쉴드시간 public Slider slider_hp; + public IngameBuffDebuffBase m_IngameBuffDebuffBase; PetListTableData m_PetTableData; //ServerData_Pet m_ServerData_Pet; bool isOnlyShow, ShowShieldTime; + private void Awake() + { + Ins = this; + isIns = true; + } + public void Set_Empty() { m_PetTableData = null; diff --git a/Assets/Script/UI/Pet/IngamePetCard_BuffDebuff.cs b/Assets/Script/UI/Pet/IngamePetCard_BuffDebuff.cs new file mode 100644 index 000000000..f10ee7e81 --- /dev/null +++ b/Assets/Script/UI/Pet/IngamePetCard_BuffDebuff.cs @@ -0,0 +1,13 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class IngamePetCard_BuffDebuff : uScrollViewMgr +{ + private void OnEnable() + { + CardBase_AllOff(); + } + + +} \ No newline at end of file diff --git a/Assets/Script/UI/Pet/IngamePetCard_BuffDebuff.cs.meta b/Assets/Script/UI/Pet/IngamePetCard_BuffDebuff.cs.meta new file mode 100644 index 000000000..203e3d782 --- /dev/null +++ b/Assets/Script/UI/Pet/IngamePetCard_BuffDebuff.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c9cbe9c3b63ae2c41a3fd75f2fca3e13 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Script/UI/Stage/MyInfoUI.cs b/Assets/Script/UI/Stage/MyInfoUI.cs index bb182e647..428095526 100644 --- a/Assets/Script/UI/Stage/MyInfoUI.cs +++ b/Assets/Script/UI/Stage/MyInfoUI.cs @@ -8,6 +8,7 @@ public class MyInfoUI : MonoBehaviourSingletonuScrollViewArrMgr public TextMeshProUGUI[] labels; // 0 이름, 1 직업 public Slider slider_hp, slider_mp, slider_exp; public TextMeshProUGUI[] texts; // 0 hp, 1 mp, 2 lv 3 exp + public IngameBuffDebuffBase m_IngameBuffDebuffBase; List mainStatCardDatas = new List { @@ -18,8 +19,6 @@ public class MyInfoUI : MonoBehaviourSingletonuScrollViewArrMgr }; List list_buffindex = new List { 0, 1, 2 }; - List list_buffDebuffDatas = new List(); - public override void Set() { var sdata = ServerInfo.Ins.m_ServerData; @@ -38,7 +37,7 @@ public class MyInfoUI : MonoBehaviourSingletonuScrollViewArrMgr Set_MainStats(); Set_ScrollView(1, list_buffindex, false); - CardBase_AllOff(2); + m_IngameBuffDebuffBase.AllOff(); } public void Set_HP(double curHP, double maxHP) @@ -62,24 +61,6 @@ public class MyInfoUI : MonoBehaviourSingletonuScrollViewArrMgr Set_ScrollView(0, mainStatCardDatas, false); } - public void Add_IngameBuffDebuff(string icon, float time) - { - bool add = false; - for (int i = 0; i < list_buffDebuffDatas.Count; i++) - { - if (list_buffDebuffDatas[i].s_Icon.Equals(icon)) - { - add = true; - list_buffDebuffDatas[i].f_Time = time; - break; - } - } - - if (!add) list_buffDebuffDatas.Add(new IngameBuffDebuffData { s_Icon = icon, f_Time = time }); - - Set_ScrollView(2, list_buffDebuffDatas, false); - } - private void OnEnable() { Set();