コード例 #1
0
ファイル: Marker.cs プロジェクト: aologos/Citrus
 public Marker(string id, int frame, MarkerAction action, string jumpTo = null)
 {
     this.Id     = id;
     this.Frame  = frame;
     this.Action = action;
     this.JumpTo = jumpTo;
 }
コード例 #2
0
ファイル: CommandBindings.cs プロジェクト: klenin/Citrus
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
    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>();
    }