Beispiel #1
0
        /**
         * <summary>Creates a new instance of the 'Engine: Play movie clip' Action, set to stop video playback</summary>
         * <param name = "videoPlayer">The video player to stop</param>
         * <param name = "pauseOnly">If True, then the video will be paused so that it can be later resumed</param>
         * <returns>The generated Action</returns>
         */
        public static ActionMovie CreateNew_Stop(VideoPlayer videoPlayer, bool pauseOnly = false)
        {
            ActionMovie newAction = (ActionMovie)CreateInstance <ActionMovie>();

            newAction.movieClipType       = MovieClipType.VideoPlayer;
            newAction.movieMaterialMethod = (pauseOnly) ? MovieMaterialMethod.PauseMovie : MovieMaterialMethod.StopMovie;
            return(newAction);
        }
Beispiel #2
0
        /**
         * <summary>Creates a new instance of the 'Engine: Play movie clip' Action, set to prepare a new video</summary>
         * <param name = "videoPlayer">The video player to prepare</param>
         */
        public static ActionMovie CreateNew_Prepare(VideoPlayer videoPlayer)
        {
            ActionMovie newAction = (ActionMovie)CreateInstance <ActionMovie>();

            newAction.movieClipType       = MovieClipType.VideoPlayer;
            newAction.movieMaterialMethod = MovieMaterialMethod.PlayMovie;
            newAction.videoPlayer         = videoPlayer;
            newAction.prepareOnly         = true;
            return(newAction);
        }
Beispiel #3
0
        /**
         * <summary>Creates a new instance of the 'Engine: Play movie clip' Action, set to play a new video</summary>
         * <param name = "videoPlayer">The video player to play on</param>
         * <param name = "waitUntilFinish">If True, then the Action will wait until the video is complete</param>
         * <param name = "pausewhenGameDoes">If True, the video player will pause when the game itself is paused</param>
         * <param name = "inputButtonToSkip">If not empty, the name input button that will skip playback when pressed by the player</param>
         * <returns>The generated Action</returns>
         */
        public static ActionMovie CreateNew_Play(VideoPlayer videoPlayer, bool waitUntilFinish = true, bool pauseWhenGameDoes = true, string inputButtonToSkip = "")
        {
            ActionMovie newAction = (ActionMovie)CreateInstance <ActionMovie>();

            newAction.movieClipType       = MovieClipType.VideoPlayer;
            newAction.movieMaterialMethod = MovieMaterialMethod.PlayMovie;
            newAction.videoPlayer         = videoPlayer;
            newAction.willWait            = waitUntilFinish;
            newAction.prepareOnly         = false;
            newAction.pauseWithGame       = pauseWhenGameDoes;
            newAction.canSkip             = !string.IsNullOrEmpty(inputButtonToSkip);
            newAction.skipKey             = inputButtonToSkip;
            return(newAction);
        }