펫 상태이상 ui 추가

This commit is contained in:
Ino 2025-03-05 16:08:07 +09:00
parent 2a9396b090
commit 10407fa94f
10 changed files with 179 additions and 26 deletions

View File

@ -576,6 +576,66 @@ MonoBehaviour:
m_FillOrigin: 2 m_FillOrigin: 2
m_UseSpriteMesh: 0 m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1 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 --- !u!1 &6957816333201879133
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -586,6 +646,7 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 1303839936856560027} - component: {fileID: 1303839936856560027}
- component: {fileID: 2437459072261602851} - component: {fileID: 2437459072261602851}
- component: {fileID: 3031892410646379827}
m_Layer: 5 m_Layer: 5
m_Name: IngamePetCard m_Name: IngamePetCard
m_TagString: Untagged m_TagString: Untagged
@ -613,6 +674,7 @@ RectTransform:
- {fileID: 6585263534833399476} - {fileID: 6585263534833399476}
- {fileID: 4242632587874139151} - {fileID: 4242632587874139151}
- {fileID: 2066034075942729184} - {fileID: 2066034075942729184}
- {fileID: 6685550052984212000}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0} m_AnchorMin: {x: 1, y: 0}
@ -643,6 +705,22 @@ MonoBehaviour:
- {fileID: 8744080277100484966} - {fileID: 8744080277100484966}
- {fileID: 1131690825878101170} - {fileID: 1131690825878101170}
slider_hp: {fileID: 2829501000363712437} 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 --- !u!1 &8128196453817547961
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -104578,6 +104578,7 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 3764310506534080148} - component: {fileID: 3764310506534080148}
- component: {fileID: 389072258464090254} - component: {fileID: 389072258464090254}
- component: {fileID: 3077886675301288154}
m_Layer: 5 m_Layer: 5
m_Name: MyInfoUI m_Name: MyInfoUI
m_TagString: Untagged m_TagString: Untagged
@ -104629,11 +104630,9 @@ MonoBehaviour:
m_content: m_content:
- {fileID: 2831895023035487834} - {fileID: 2831895023035487834}
- {fileID: 8162699013497819267} - {fileID: 8162699013497819267}
- {fileID: 1400472963099907056}
go_card: go_card:
- {fileID: 1249779519052861029, guid: 1c5227ecba07b514f921839634d96a65, type: 3} - {fileID: 1249779519052861029, guid: 1c5227ecba07b514f921839634d96a65, type: 3}
- {fileID: 1568274442747495661, guid: a9dc9c931b5d4844f9a9e7879fb4ba41, type: 3} - {fileID: 1568274442747495661, guid: a9dc9c931b5d4844f9a9e7879fb4ba41, type: 3}
- {fileID: 1568274442747495661, guid: 9a3ef2c7c45c3b04fa5b3d37418cd361, type: 3}
sprites: sprites:
- {fileID: 1700882581535685601} - {fileID: 1700882581535685601}
- {fileID: 8357719897097132384} - {fileID: 8357719897097132384}
@ -104648,6 +104647,22 @@ MonoBehaviour:
- {fileID: 1818283761846774502} - {fileID: 1818283761846774502}
- {fileID: 6971928542919759379} - {fileID: 6971928542919759379}
- {fileID: 12548458969975031} - {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 --- !u!1 &8669924406722207843
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -1227,7 +1227,9 @@ public class Actor : MyCoroutine
void Set_IngameBuffDebuffUI(SkillTypeConfigTableData skillExtraData, float time) void Set_IngameBuffDebuffUI(SkillTypeConfigTableData skillExtraData, float time)
{ {
if (MyInfoUI.isIns && IsRole(eRole.PC)) 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) public void Check_EnchantOption(DamageInfo _dinfo, bool whenhit = true)
{ {

View File

@ -1,5 +1,3 @@
using System.Collections;
using System.Collections.Generic;
using TMPro; using TMPro;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;

View File

@ -0,0 +1,34 @@
using System.Collections.Generic;
public class IngameBuffDebuffBase : uScrollViewMgr
{
List<IngameBuffDebuffData> list_buffDebuffDatas = new List<IngameBuffDebuffData>();
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);
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 79b2432502e7b4f40aa98039dd43febe
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -3,14 +3,24 @@ using UnityEngine.UI;
public class IngamePetCard : CardCoolTimeBase public class IngamePetCard : CardCoolTimeBase
{ {
public static IngamePetCard Ins;
public static bool isIns;
public Image[] sprites; // 0 등급, 1 아이콘, 2 공격타입bg, 3 공격타입, 4 쿨타임, 5 쉴드시간 public Image[] sprites; // 0 등급, 1 아이콘, 2 공격타입bg, 3 공격타입, 4 쿨타임, 5 쉴드시간
public Slider slider_hp; public Slider slider_hp;
public IngameBuffDebuffBase m_IngameBuffDebuffBase;
PetListTableData m_PetTableData; PetListTableData m_PetTableData;
//ServerData_Pet m_ServerData_Pet; //ServerData_Pet m_ServerData_Pet;
bool isOnlyShow, ShowShieldTime; bool isOnlyShow, ShowShieldTime;
private void Awake()
{
Ins = this;
isIns = true;
}
public void Set_Empty() public void Set_Empty()
{ {
m_PetTableData = null; m_PetTableData = null;

View File

@ -0,0 +1,13 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class IngamePetCard_BuffDebuff : uScrollViewMgr
{
private void OnEnable()
{
CardBase_AllOff();
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c9cbe9c3b63ae2c41a3fd75f2fca3e13
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -8,6 +8,7 @@ public class MyInfoUI : MonoBehaviourSingletonuScrollViewArrMgr<MyInfoUI>
public TextMeshProUGUI[] labels; // 0 이름, 1 직업 public TextMeshProUGUI[] labels; // 0 이름, 1 직업
public Slider slider_hp, slider_mp, slider_exp; public Slider slider_hp, slider_mp, slider_exp;
public TextMeshProUGUI[] texts; // 0 hp, 1 mp, 2 lv 3 exp public TextMeshProUGUI[] texts; // 0 hp, 1 mp, 2 lv 3 exp
public IngameBuffDebuffBase m_IngameBuffDebuffBase;
List<MainStatCardData> mainStatCardDatas = new List<MainStatCardData> List<MainStatCardData> mainStatCardDatas = new List<MainStatCardData>
{ {
@ -18,8 +19,6 @@ public class MyInfoUI : MonoBehaviourSingletonuScrollViewArrMgr<MyInfoUI>
}; };
List<int> list_buffindex = new List<int> { 0, 1, 2 }; List<int> list_buffindex = new List<int> { 0, 1, 2 };
List<IngameBuffDebuffData> list_buffDebuffDatas = new List<IngameBuffDebuffData>();
public override void Set() public override void Set()
{ {
var sdata = ServerInfo.Ins.m_ServerData; var sdata = ServerInfo.Ins.m_ServerData;
@ -38,7 +37,7 @@ public class MyInfoUI : MonoBehaviourSingletonuScrollViewArrMgr<MyInfoUI>
Set_MainStats(); Set_MainStats();
Set_ScrollView(1, list_buffindex, false); Set_ScrollView(1, list_buffindex, false);
CardBase_AllOff(2); m_IngameBuffDebuffBase.AllOff();
} }
public void Set_HP(double curHP, double maxHP) public void Set_HP(double curHP, double maxHP)
@ -62,24 +61,6 @@ public class MyInfoUI : MonoBehaviourSingletonuScrollViewArrMgr<MyInfoUI>
Set_ScrollView(0, mainStatCardDatas, false); 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() private void OnEnable()
{ {
Set(); Set();