WuhuIslandTesting/Library/PackageCache/com.stresslevelzero.marrow.sdk@1.2.0/Scripts/SLZ.Marrow/SLZ.Marrow.Zones/ZoneItem.cs

27 lines
758 B
C#
Raw Normal View History

2025-01-07 02:06:59 +01:00
using SLZ.Marrow.Warehouse;
using UnityEngine;
namespace SLZ.Marrow.Zones
{
public class ZoneItem : MonoBehaviour, IZoneEntityListenable
{
[SerializeField]
protected Zone _zone;
public MarrowQuery activatorTags = new();
#if UNITY_EDITOR
protected virtual void Reset()
{
var query = new TagQuery();
BoneTagReference btRef = new BoneTagReference(MarrowSettings.RuntimeInstance.PlayerTag.Barcode);
query.BoneTag = btRef;
activatorTags.Tags.Add(query);
_zone = GetComponent<Zone>();
if (_zone != null || transform.parent == null)
return;
_zone = transform.parent.GetComponent<Zone>();
}
#endif
}
}