public Marker(string id, int frame, MarkerAction action, string jumpTo = null) { this.Id = id; this.Frame = frame; this.Action = action; this.JumpTo = jumpTo; }
static void CreateMarker(MarkerAction action) { var timeline = Timeline.Instance; var nearestMarker = Document.Current.Container.Markers.LastOrDefault( m => m.Frame < timeline.CurrentColumn && m.Action == MarkerAction.Play); var newMarker = new Marker( action == MarkerAction.Play ? "Start" : "", timeline.CurrentColumn, action, action == MarkerAction.Jump && nearestMarker != null ? nearestMarker.Id : "" ); Core.Operations.SetMarker.Perform(Document.Current.Container.DefaultAnimation.Markers, newMarker); }
private static void CreateMarker(MarkerAction action) { var timeline = Timeline.Instance; var nearestMarker = Document.Current.Animation.Markers.LastOrDefault( m => m.Frame < timeline.CurrentColumn && m.Action == MarkerAction.Play); string markerId = (action == MarkerAction.Play) ? GenerateMarkerId(Document.Current.Animation.Markers, "Start") : ""; var newMarker = new Marker( markerId, timeline.CurrentColumn, action, action == MarkerAction.Jump && nearestMarker != null ? nearestMarker.Id : "" ); SetMarker.Perform(newMarker, true); }
void Start() { markerAction = gameObject.GetComponent <MarkerAction>(); if (markerAction == null) { throw new Exception("No Marker Action component found."); } if (lanesParentObject == null) { lanesParentObject = GameObject.Find("Edges"); } if (traciController == null) { traciController = FindObjectOfType <TraciController>(); } edgeScript = lanesParentObject.GetComponent <Edge>(); triggerAreasSet = false; }
void Start() { markerAction = gameObject.GetComponent <MarkerAction>(); if (markerAction == null) { throw new Exception("No Marker Action component found."); } if (junctionsParentObject == null) { junctionsParentObject = GameObject.Find("Junctions"); } if (traciController == null) { traciController = FindObjectOfType <TraciController>(); } junctionScript = junctionsParentObject.GetComponent <Junction>(); triggerAreasSet = false; junctionAndTrafficLightIds = new Dictionary <string, string>(); }