コード例 #1
0
    void OnSceneUpdated(VideoControl videoControl, VideoControl.VideoScene scene)
    {
        Debug.LogFormat("OnSceneUpdated :: scene:{0}", scene.label);

        videoScenesVisitCount [scene.label] += 1;

        if (videoScenesVisitCount [scene.label] == 1)
        {
            // if first time visit then play the associated audio track
            switch (scene.label)
            {
            case VideoControl.SCENE_INTRO:
                playAudioClips(new string[] { "scene0_a" });
                break;

            case VideoControl.SCENE_TOP_MIDDLE:
                playAudioClips(new string[] { "scene1_a" });
                break;

            case VideoControl.SCENE_UNDER:
                playAudioClips(new string[] { "scene2_a" });
                break;

            case VideoControl.SCENE_OUTTRO:
                playAudioClips(new string[] { "scene3_a" });
                break;
            }
        }
    }
コード例 #2
0
    void OnSceneKeyFrame(VideoControl videoControl, VideoControl.VideoScene scene, VideoControl.VideoSceneKeyframe keyframe)
    {
        Debug.LogFormat("OnSceneKeyFrame :: scene:{0}, keyframe:{1}", scene.label, keyframe.label);

        HideRainingEffect();

        if (keyframe.label == VideoControl.VideoScene.START)
        {
            // ignore
        }
        else if (keyframe.label == VideoControl.VideoScene.END)
        {
            if (scene.label == VideoControl.SCENE_UNDER)
            {
                VideoControl.Instance.GotoScene(VideoControl.SCENE_OUTTRO);
            }
            else if (scene.label == VideoControl.SCENE_OUTTRO)                 // that's all folks
            {
                VideoControl.Instance.Pause();
            }
        }
        else if (keyframe.label == VideoControl.VideoScene.INTERACTIVCE)
        {
            if (scene.label == VideoControl.SCENE_TOP_MIDDLE)
            {
                playAudioClips(new string[] { "scene1_c", "scene1_d", "scene1_e" });
            }

            // enable interactive controls
            foreach (var but in navigationButtons)
            {
                if (but.AssociatedScene == scene.label)
                {
                    but.Show();
                }
            }
        }
        else if (keyframe.label == "middle" && scene.label == VideoControl.SCENE_TOP_MIDDLE)
        {
            // play associated audio
            playAudioClips(new string[] { "scene1_b" });
        }
        else if (keyframe.label == "rain")
        {
            ShowRainingEffect();
        }
    }
コード例 #3
0
 void OnSceneUpdated(VideoControl videoControl, VideoControl.VideoScene scene)
 {
     UpdatePlayButtonTexture();
 }
コード例 #4
0
 void OnSceneStateChanged(VideoControl videoControl, VideoControl.VideoScene scene, VideoControl.State videoControlState)
 {
     Debug.LogFormat("OnSceneStateChanged :: scene:{0}, state:{1}", scene.label, videoControlState.ToString());
 }