Beispiel #1
0
    private void SetTracklist(Tracklist t)
    {
        this.tracklist = t;
        TracklistEntry[]    entries = tracklist.entries;
        EventTracklistEntry entry;
        TracklistEntry      nextEntry;

        for (int k = 0; k < entries.Length; k++)
        {
            entry = (EventTracklistEntry)entries [k];
            if (entry is LoopingTracklistEntry)
            {
                LoopingTrack loopingTrack = (LoopingTrack)entry.GetTrack();
                entry.AddStateEventAtTimeRemaining(LoopCurrentTrack, loopingTrack.crossoverTime);
            }
            else if (k < entries.Length - 1)
            {
                nextEntry = entries [k + 1];
                entry.AddStateEventAtTimeRemaining(PlayNextTrack, nextEntry.GetTrack().EntranceFadeTime());
            }
//			entry.AddStateEventAtTime (UnloadPreviousTrack, 4f);
//			entry.AddStateEventAtTime (LoadNextTrack, 5f);
        }
                #if !UNITY_EDITOR
        ((MobileVideoPlayer)videoSystem.GetPlayer()).InitialiseMobileVideoTracksInList(tracklist);
                #endif
    }
Beispiel #2
0
//	public override void AddEventAtTime (TrackEventDelegate newEvent, float eventTime)
//	{
//		Debug.Log ("Added Event to Looper "+name);
//		base.AddEventAtTime (newEvent, eventTime);
//		if (clone)
//			clone.AddEventAtTime (newEvent, eventTime);
//	}
//
//	public override void AddStateEventAtTime (TrackEventDelegate newEvent, float eventTime)
//	{
//		Debug.Log ("Added State Event to Looper "+name);
//		base.AddStateEventAtTime (newEvent, eventTime);
//		if (clone)
//			clone.AddStateEventAtTime (newEvent, eventTime);
//	}

    public void Clone()
    {
        if (shouldClone)
        {
            GameObject cloneObject = GameObject.Instantiate(gameObject) as GameObject;
            cloneObject.transform.SetParent(transform);
            clone = cloneObject.GetComponent <LoopingTrack> ();
            clone.DisableClone();
            GetComponent <LoopingTracklistEntry> ().SetCloneTrack(clone);
        }
    }
Beispiel #3
0
 public void SetCloneTrack(LoopingTrack clone)
 {
     cloneTrack = clone;
 }