Exemple #1
0
    public void startPlaying()
    {
        vp.Stop();
        capturePreview.Stop();

        HideGif();

        ShowTime[] showTimes   = data.GetShowTimesOfCurrentCharacter();
        float      sceneLength = data.getCurrentSceneLength();

        shouldChangeFrames = true;
        vp.Play();

        Debug.Log("Movie frameCount:  " + vp.frameCount + ", frameRate: " + vp.frameRate);
        Invoke("playCapture", 3f);


        if (showTimes[0].start > 3)
        {
            Invoke("HideGif", 3f);
        }
        for (int i = 0; i < showTimes.Length; i++)
        {
            Invoke("ShowGif", showTimes[i].start - .2f);
            if (showTimes[i].end != sceneLength)
            {
                Invoke("HideGif", showTimes[i].end + .3f);
            }
        }
    }