2025-04-02 01:16:20 +00:00
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
public class TestMapUIMgr : MonoBehaviourSingletonTemplate<TestMapUIMgr>
|
|
|
|
|
{
|
|
|
|
|
public GameObject[] gos; // 0 캐릭터 설정, 1 몬스터 설정
|
2025-04-02 23:29:27 +00:00
|
|
|
public TM_Skills m_TM_Skills;
|
2025-04-02 04:15:38 +00:00
|
|
|
public TM_ClassChange m_TM_ClassChange;
|
2025-04-03 07:00:38 +00:00
|
|
|
public TM_MonsterSet m_TM_MonsterSet;
|
2025-05-01 21:41:01 +00:00
|
|
|
public GameObject[] gos_other; // 0 펫 체크
|
2025-04-02 01:16:20 +00:00
|
|
|
|
2025-04-03 23:12:48 +00:00
|
|
|
MobActor MobActor;
|
|
|
|
|
Vector3 MobPos = new Vector3(15, 0, 20);
|
2025-05-01 21:41:01 +00:00
|
|
|
bool ShowPet = true;
|
2025-04-03 23:12:48 +00:00
|
|
|
|
2025-04-02 01:16:20 +00:00
|
|
|
private void Start() { Set_TestBtns(false); }
|
|
|
|
|
public void Set_TestBtns(bool active)
|
|
|
|
|
{
|
|
|
|
|
for (int i = 0; i < gos.Length; i++)
|
|
|
|
|
gos[i].SetActive(active);
|
2025-05-01 21:41:01 +00:00
|
|
|
|
|
|
|
|
if (active) Set_Pet();
|
2025-04-02 01:16:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void OnClick_Button(int button)
|
|
|
|
|
{
|
|
|
|
|
switch (button)
|
|
|
|
|
{
|
|
|
|
|
case 0: // 캐릭터 설정
|
2025-04-02 04:15:38 +00:00
|
|
|
m_TM_ClassChange.Set();
|
2025-04-02 01:16:20 +00:00
|
|
|
break;
|
|
|
|
|
case 1: // 몬스터 설정
|
2025-04-03 07:00:38 +00:00
|
|
|
m_TM_MonsterSet.Set();
|
2025-04-02 01:16:20 +00:00
|
|
|
break;
|
2025-05-01 21:41:01 +00:00
|
|
|
case 2: // 펫 on/off
|
|
|
|
|
ShowPet = !ShowPet;
|
|
|
|
|
Set_Pet();
|
|
|
|
|
break;
|
2025-04-02 01:16:20 +00:00
|
|
|
}
|
|
|
|
|
}
|
2025-04-03 23:12:48 +00:00
|
|
|
|
2025-05-01 21:41:01 +00:00
|
|
|
void Set_Pet()
|
|
|
|
|
{
|
|
|
|
|
gos_other[0].SetActive(ShowPet);
|
|
|
|
|
MyValue.MyPC.Get_MyPet().gameObject.SetActive(ShowPet);
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-03 23:12:48 +00:00
|
|
|
public void MakeMob(MonsterTableData mobData)
|
|
|
|
|
{
|
|
|
|
|
if (!DSUtil.CheckNull(MobActor))
|
|
|
|
|
{
|
|
|
|
|
ActorInfo.Ins.Destroy_Mob();
|
|
|
|
|
ActorInfo.Ins.All_DelTarget();
|
|
|
|
|
MobActor = null;
|
|
|
|
|
}
|
|
|
|
|
AddrResourceMgr.Ins.LoadObject<GameObject>(mobData.s_MonsterPrefab, handle =>
|
|
|
|
|
{
|
|
|
|
|
MobActor = DSUtil.Get_Clone<MobActor>(handle.Result);
|
|
|
|
|
AddrResourceMgr.Ins.Set_AddressableReleaseSelf(MobActor.gameObject);
|
|
|
|
|
ActorInfo.Ins.Add_Actor(MobActor, eRole.Mob, m_TM_MonsterSet.Get_SpawnID(), mobData.s_MonsterPrefab);
|
|
|
|
|
|
|
|
|
|
MobActor.Set(true, null, null, m_TM_MonsterSet.Get_SpawnID(), false);
|
|
|
|
|
MobActor.Set(mobData, MobPos, null, 0);
|
|
|
|
|
MobActor.MagicID = 0;
|
|
|
|
|
|
|
|
|
|
ToastUI.Ins.Set(174, "스폰 아이디 : " + m_TM_MonsterSet.Get_SpawnID());
|
|
|
|
|
m_TM_MonsterSet.OnClick_Back();
|
|
|
|
|
});
|
|
|
|
|
}
|
2025-04-02 01:16:20 +00:00
|
|
|
}
|