Project_WL/Assets/Script/Ingame/Obj/MobMark.cs

22 lines
409 B
C#

using UnityEngine;
public class MobMark : MonoBehaviour
{
Actor m_Target;
bool isTarget;
private void Update()
{
if (isTarget) transform.position = m_Target.Get_Top_postion();
}
public void Set(bool active, Actor actor)
{
gameObject.SetActive(active);
if (active)
{
m_Target = actor;
isTarget = m_Target;
}
}
}