Exemple #1
0
        public void Open(string path, PlayMode mode)
        {
            Dispose();
            this.path      = path;
            seqence        = new XSeqence(path, mode);
            seqence.Finish = OnPlayFinish;
            AddRuntime();
            float dur = seqence.RecalcuteDuration();

            window.SetTimeRange(0, dur * 1.5f);
            OnCreated(path, mode);
        }
Exemple #2
0
        public void CreateSeqence(string path, PlayMode mode)
        {
            Dispose();
            this.path = path;
            SeqenceConfig xconf = new SeqenceConfig();

            xconf.tracks = new TrackData[1];
            TrackData data = new TrackData();

            data.type       = AssetType.Marker;
            xconf.tracks[0] = data;
            xconf.Write(path);
            seqence        = new XSeqence(xconf, mode);
            seqence.Finish = OnPlayFinish;
            AddRuntime();
            seqence.Time     = 1.0f;
            seqence.editMode = SeqencePlayMode.EditorRun;
            OnCreated(path, mode);
        }
Exemple #3
0
 private void OnCreated(string path, PlayMode m)
 {
     PlayerPrefs.SetString(cache_key, path);
     PlayerPrefs.SetInt(cache_mode, (int)m);
 }