Example #1
0
    private void SwitchToCurrentPlayerTL()
    {
        UITimeline       tl_ui   = levelUI_GO.GetComponent <UITimeline>();
        PlayerController last_pc = GetCurrentPlayer();

        tl_ui.trySwitchTimeline(last_pc.Mdl.TL);
    }
Example #2
0
 public void Initialize(UITimeline timeline, float[] samples, DataContainer container)
 {
     this.timeline = timeline;
     engine        = new EmotionEngine();
     engine.Initialize(timeline.Duration, samples, container, 1024);
     engine.Precompute();
 }
Example #3
0
 public void Initialize(UITimeline timeline, int id)
 {
     this.TrackId       = id;
     this.timeline      = timeline;
     this.trackDuration = timeline.Duration;
     this.TrackColor    = Random.ColorHSV(0f, 1f, 1f, 1f, .75f, 1f);
     OnInitialize();
 }
Example #4
0
 void Start()
 {
     panel.SetActive(false);
     Events.OnTimelineUpdated += OnTimelineUpdated;
     Events.OnUIButtonClicked += OnUIButtonClicked;
     Events.AddNewScene       += AddNewScene;
     Events.NewSceneActive    += NewSceneActive;
     uiTimeline = GetComponent <UITimeline> ();
 }
Example #5
0
    public virtual void InitializeFromSerializedData(UITimeline timeline, AbstractDataTrack <T> track, Rect container, TrackChunkData chunk)
    {
        this.track                 = track;
        this.timeline              = timeline;
        this.container             = container;
        this.Position              = chunk.start;
        this.Width                 = chunk.end - chunk.start;
        this.Snap                  = true; // For now...
        this.HarmonySequenceNumber = chunk.harmonySequenceNumber;
        this.IsVariation           = chunk.isVariation;
        this.IntensityCurveType    = chunk.intensityCurve;
        UpdatePosition();

        UpdateChunkName(track.TrackName);
        chunkBackground.color = track.TrackColor;
    }
Example #6
0
    public void Initialize(UITimeline timeline, AbstractDataTrack <T> track, T data, Rect container, float position, float width)
    {
        this.track                 = track;
        this.timeline              = timeline;
        this.container             = container;
        this.Position              = position;
        this.Width                 = width;
        this.Data                  = data;
        this.Snap                  = true; // For now...
        this.HarmonySequenceNumber = 1;
        this.IsVariation           = false;
        this.IntensityCurveType    = IntensityCurve.Invariant;
        UpdatePosition();

        UpdateChunkName(track.TrackName);
        chunkBackground.color = track.TrackColor;
    }
Example #7
0
    private void SwitchToNextTL()
    {
        UITimeline tl_ui           = levelUI_GO.GetComponent <UITimeline>();
        int        next_loop_level = tl_ui.getDisplayedLoopLevel() + 1;

        if (next_loop_level >= Mdl.Players.Count)
        {
            next_loop_level = 0;
        }


        CurrentCamera?.GetComponent <PostFXRenderer>()?.StartAnimation(Vector2.zero, Mathf.Max(0, tl_ui.getDisplayedLoopLevel()), Mathf.Max(0, next_loop_level));

        var       selected_player_for_tl = Mdl.Players[next_loop_level];
        ITimeline tl_to_display          = selected_player_for_tl.GetComponent <PlayerController>().Mdl.TL;

        tl_ui.trySwitchTimeline(tl_to_display);
    }
Example #8
0
 public TimelineLayer(UITimeline timeline)
 {
     Timeline = timeline;
 }
Example #9
0
 public override void Dispose()
 {
     base.Dispose();
     Timeline = null;
 }
Example #10
0
 public void Initialize(UITimeline timeline, float baseDuration)
 {
     this.timeline = timeline;
 }
Example #11
0
 public override void InitializeFromSerializedData(UITimeline timeline, AbstractDataTrack <EmotionData> track, Rect container, TrackChunkData chunk)
 {
     base.InitializeFromSerializedData(timeline, track, container, chunk);
     this.Data = chunk.startData;
 }