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

22 lines
409 B
C#
Raw Normal View History

2024-12-15 01:39:39 +00:00
using UnityEngine;
public class MobMark : MonoBehaviour
{
2025-03-03 02:19:33 +00:00
Actor m_Target;
bool isTarget;
2024-12-15 01:39:39 +00:00
private void Update()
{
2025-03-03 02:19:33 +00:00
if (isTarget) transform.position = m_Target.Get_Top_postion();
2024-12-15 01:39:39 +00:00
}
2025-03-03 02:19:33 +00:00
public void Set(bool active, Actor actor)
2024-12-15 01:39:39 +00:00
{
gameObject.SetActive(active);
if (active)
{
2025-03-03 02:19:33 +00:00
m_Target = actor;
isTarget = m_Target;
2024-12-15 01:39:39 +00:00
}
}
}