core/pac/Interactable.cs
public class IsoInteractable : Component {
[Property] public Vector3 Size {get; set;}
[Property] public Vector3 Center {get; set;}
[Property] public List<PacViewNode> ValidNodes {get; set;}
[Property] public GameObject IsoPathGoal {get; set;}
public BBox Box => new(Center - Size * 0.5f, Center + Size * 0.5f);
protected override void DrawGizmos() {
Gizmo.Draw.IgnoreDepth = true;
Gizmo.Draw.Color = Color.Yellow;
Gizmo.Draw.LineBBox(Box);
base.DrawGizmos();
}
[Property] public Action OnUse {get; set;}
public void Interact() {
OnUse?.Invoke();
}
}