mobmark
This commit is contained in:
parent
45cbfe782d
commit
f595b59062
File diff suppressed because it is too large
Load Diff
|
|
@ -555,14 +555,7 @@ public class MobActor : Actor
|
|||
public override bool isNoseeMob() { return isNSLDMob ? m_NoSeeLongDMob.IsNoSeeMob() : false; }
|
||||
public override int Get_Group() { return m_SpawnerId; }
|
||||
protected override void Set_MobMark(bool active)
|
||||
{
|
||||
//if (m_MobMark == null)
|
||||
//{
|
||||
// m_MobMark = InGameInfo.Ins.Get_Obj(eObj.MobMark).GetComponent<MobMark>();
|
||||
// m_MobMark.transform.localScale = Vector3.one * 0.2f;
|
||||
//}
|
||||
//m_MobMark.Set(active, tf_HUD_Dmg);
|
||||
}
|
||||
{ InGameInfo.Ins.Get_Obj(eObj.MobMark).GetComponent<MobMark>().Set(active, this); }
|
||||
|
||||
public override void Play_Hit()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public partial class InGameInfo : MyCoroutine
|
|||
Dictionary<string, List<GameObject>> dic_str_Effect = new Dictionary<string, List<GameObject>>();
|
||||
|
||||
Dictionary<eEffect, List<GameObject>> dic_Skill = new Dictionary<eEffect, List<GameObject>>();
|
||||
Dictionary<eObj, List<GameObject>> dic_Obj = new Dictionary<eObj, List<GameObject>>();
|
||||
Dictionary<eObj, GameObject> dic_Obj = new Dictionary<eObj, GameObject>();
|
||||
eGameMode m_GameMode;
|
||||
List<GameObject> list_dropitems = new List<GameObject>();
|
||||
List<ProjectileData> list_projectileData = new List<ProjectileData>();
|
||||
|
|
@ -35,20 +35,17 @@ public partial class InGameInfo : MyCoroutine
|
|||
list_quickamount.Add(0);
|
||||
|
||||
for (eObj i = 0; i < eObj.Max; i++)
|
||||
dic_Obj.Add(i, new List<GameObject>());
|
||||
dic_Obj.Add(i, null);
|
||||
|
||||
AddrResourceMgr.Ins.LoadObject<GameObject>("Assets/Res_Addr/Obj/MobMark.prefab", handle =>
|
||||
{
|
||||
if (handle.IsDone && handle.Status == AsyncOperationStatus.Succeeded)
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
var mm = DSUtil.Get_Clone(handle.Result, tf_Objs);
|
||||
AddrResourceMgr.Ins.Set_AddressableReleaseSelf(mm);
|
||||
dic_Obj[eObj.MobMark].Add(mm);
|
||||
dic_Obj[eObj.MobMark] = mm;
|
||||
mm.SetActive(false);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
for (int i = 0; i < 200; i++) // 너무 많나?
|
||||
|
|
@ -376,20 +373,7 @@ public partial class InGameInfo : MyCoroutine
|
|||
});
|
||||
}
|
||||
|
||||
public GameObject Get_Obj(eObj obj)
|
||||
{
|
||||
GameObject temp = null;
|
||||
for (int i = 0; i < dic_Obj[obj].Count; i++)
|
||||
{
|
||||
if (!dic_Obj[obj][i].activeInHierarchy)
|
||||
{
|
||||
temp = dic_Obj[obj][i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return temp;
|
||||
}
|
||||
public GameObject Get_Obj(eObj obj) { return dic_Obj[obj]; }
|
||||
|
||||
string Get_SkillPrefabPath(eEffect effect)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,24 +1,22 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class MobMark : MonoBehaviour
|
||||
{
|
||||
Transform tf_Target;
|
||||
Actor m_Target;
|
||||
bool isTarget;
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (tf_Target)
|
||||
transform.position = tf_Target.position;
|
||||
if (isTarget) transform.position = m_Target.Get_Top_postion();
|
||||
}
|
||||
|
||||
public void Set(bool active, Transform tf)
|
||||
public void Set(bool active, Actor actor)
|
||||
{
|
||||
gameObject.SetActive(active);
|
||||
if (active)
|
||||
{
|
||||
transform.SetPositionAndRotation(tf.position, Quaternion.Euler(Vector3.left * 90f));
|
||||
tf_Target = tf;
|
||||
m_Target = actor;
|
||||
isTarget = m_Target;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue