コード例 #1
0
    public void PlayClip(string name, bool loop, bool startPaused)
    {
        if (MovieInstance == null)
        {
            throw new System.Exception("Movie instance is null");
        }
        if (!_clipLookup.ContainsKey(name))
        {
            throw new System.Exception("Frame range key not found");
        }

        MovieInstance.Loop = loop;
        _currentClip       = _clipLookup[name];
        MovieInstance.SetFrameRange(_currentClip.inPoint, _currentClip.outPoint);
        MovieInstance.PositionFrames = (uint)_currentClip.inPoint;
        if (!startPaused)
        {
            MovieInstance.Play();
        }
        else
        {
            MovieInstance.Pause();
        }
    }
コード例 #2
0
 public void ResetClip()
 {
     _currentClip = null;
     MovieInstance.SetFrameRange(-1, -1);
 }