using UnityEngine; namespace ARLocation.MapboxRoutes { public class SignPostEventArgs { public MapboxRoute Route; public Vector3 TargetPos; public Vector3? NextTargetPos; public Vector3? PrevTargetPos; public Vector3 UserPos; public float Distance; public bool IsCurrentTarget; public int StepIndex; public string Instruction { get; internal set; } public string Name { get; internal set; } } /// /// This abstract class should implement all the behaviour to guide the user along the route. /// /// Each "Step" of the route will instantiate an instance of /// `AbstractRouteSignpost` associated with a step/target of the route. /// /// For a reference implementation see the `SignPost` class. /// /// public abstract class AbstractRouteSignpost : MonoBehaviour { /// /// Initialization method. Called when the route is built the `AbstractRouteSignpost` is instantiated. /// public abstract void Init(MapboxRoute route); /// /// Called by `MapboxRoute` in the middle of its `Update` method. If this function returns `false` when the sign post's target /// is the current one, then `MapboxRoute` will set the current target to the next target. /// public abstract bool UpdateSignPost(SignPostEventArgs args); /// /// Called when the the sign post's target becomes the current target. /// public abstract void OnCurrentTarget(SignPostEventArgs args); /// /// Called when the the sign post's target no longer is the current target. /// public abstract void OffCurrentTarget(SignPostEventArgs args); } }