示例#1
0
        protected override void Setup()
        {
            MovieTexture customMovieTexture;

            if (VideoReplacement.ImportCustomVideo(PlayOnStart, out customMovieTexture))
            {
                // Play custom video
                customVideo = new CustomVideoPlayer();
                customVideo.PlayVideo(customMovieTexture);
                NativePanel.Components.Add(customVideo);
                useCustomVideo = true;
            }
            else
            {
                const int nativeScreenWidth  = 320;
                const int nativeScreenHeight = 200;

                // Add video player control
                video = new DaggerfallVideo();
                video.HorizontalAlignment = HorizontalAlignment.Center;
                video.Size = new Vector2(nativeScreenWidth, nativeScreenHeight);
                NativePanel.Components.Add(video);

                // Start playing
                if (!string.IsNullOrEmpty(PlayOnStart))
                {
                    video.Open(PlayOnStart);
                    video.Playing  = true;
                    Cursor.visible = false;
                    RaiseOnVideoStartGlobalEvent();
                }
            }
        }
示例#2
0
        protected override void Setup()
        {
            if (useCustomVideo = VideoReplacement.TryImportMovie(PlayOnStart, out customVideo))
            {
                // Play custom video
                customVideo.Size = new Vector2(Screen.width, Screen.height);
                NativePanel.Components.Add(customVideo);
                DoHideCursor(hideCursor);

                customVideo.Play();
                RaiseOnVideoStartGlobalEvent();
            }
            else
            {
                const int nativeScreenWidth  = 320;
                const int nativeScreenHeight = 200;

                // Add video player control
                video = new DaggerfallVideo();
                video.HorizontalAlignment = HorizontalAlignment.Center;
                video.Size = new Vector2(nativeScreenWidth, nativeScreenHeight);
                NativePanel.Components.Add(video);
                DoHideCursor(hideCursor);

                // Start playing
                if (!string.IsNullOrEmpty(PlayOnStart))
                {
                    video.Open(PlayOnStart);
                    video.Playing = true;
                    RaiseOnVideoStartGlobalEvent();
                }
            }
        }