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 bool isNoseeMob() { return isNSLDMob ? m_NoSeeLongDMob.IsNoSeeMob() : false; }
|
||||||
public override int Get_Group() { return m_SpawnerId; }
|
public override int Get_Group() { return m_SpawnerId; }
|
||||||
protected override void Set_MobMark(bool active)
|
protected override void Set_MobMark(bool active)
|
||||||
{
|
{ InGameInfo.Ins.Get_Obj(eObj.MobMark).GetComponent<MobMark>().Set(active, this); }
|
||||||
//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);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Play_Hit()
|
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<string, List<GameObject>> dic_str_Effect = new Dictionary<string, List<GameObject>>();
|
||||||
|
|
||||||
Dictionary<eEffect, List<GameObject>> dic_Skill = new Dictionary<eEffect, 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;
|
eGameMode m_GameMode;
|
||||||
List<GameObject> list_dropitems = new List<GameObject>();
|
List<GameObject> list_dropitems = new List<GameObject>();
|
||||||
List<ProjectileData> list_projectileData = new List<ProjectileData>();
|
List<ProjectileData> list_projectileData = new List<ProjectileData>();
|
||||||
|
|
@ -35,19 +35,16 @@ public partial class InGameInfo : MyCoroutine
|
||||||
list_quickamount.Add(0);
|
list_quickamount.Add(0);
|
||||||
|
|
||||||
for (eObj i = 0; i < eObj.Max; i++)
|
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 =>
|
AddrResourceMgr.Ins.LoadObject<GameObject>("Assets/Res_Addr/Obj/MobMark.prefab", handle =>
|
||||||
{
|
{
|
||||||
if (handle.IsDone && handle.Status == AsyncOperationStatus.Succeeded)
|
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);
|
||||||
var mm = DSUtil.Get_Clone(handle.Result, tf_Objs);
|
dic_Obj[eObj.MobMark] = mm;
|
||||||
AddrResourceMgr.Ins.Set_AddressableReleaseSelf(mm);
|
mm.SetActive(false);
|
||||||
dic_Obj[eObj.MobMark].Add(mm);
|
|
||||||
mm.SetActive(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -376,20 +373,7 @@ public partial class InGameInfo : MyCoroutine
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public GameObject Get_Obj(eObj obj)
|
public GameObject Get_Obj(eObj obj) { return dic_Obj[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;
|
|
||||||
}
|
|
||||||
|
|
||||||
string Get_SkillPrefabPath(eEffect effect)
|
string Get_SkillPrefabPath(eEffect effect)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,22 @@
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class MobMark : MonoBehaviour
|
public class MobMark : MonoBehaviour
|
||||||
{
|
{
|
||||||
Transform tf_Target;
|
Actor m_Target;
|
||||||
|
bool isTarget;
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (tf_Target)
|
if (isTarget) transform.position = m_Target.Get_Top_postion();
|
||||||
transform.position = tf_Target.position;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Set(bool active, Transform tf)
|
public void Set(bool active, Actor actor)
|
||||||
{
|
{
|
||||||
gameObject.SetActive(active);
|
gameObject.SetActive(active);
|
||||||
if (active)
|
if (active)
|
||||||
{
|
{
|
||||||
transform.SetPositionAndRotation(tf.position, Quaternion.Euler(Vector3.left * 90f));
|
m_Target = actor;
|
||||||
tf_Target = tf;
|
isTarget = m_Target;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue