public override void LoadContent(ContentManager _content)
 {
     base.LoadContent(_content);
     video = LevelDataManager.tempContent.Load<Video>(@"Video\endwithtomato2");
     player = new VideoPlayer();
     player.Play(video);
 }
コード例 #2
0
 private MediaManager()
 {
     _musics = new Dictionary<string, Song>();
     _sounds = new Dictionary<string, SoundEffect>();
     _videoPlayer = new VideoPlayer();
     CurrentSong = string.Empty;
 }
コード例 #3
0
        public Timeline(GraphicsDevice graphicsDevice, Video video, VideoPlayer player)
        {
            this.graphicsDevice = graphicsDevice;
            this.video = video;
            this.player = player;

            // Initialize clock texture
            clockTexture = new Texture2D(graphicsDevice, 4 * Settings.TIMELINE_CIRCULAR_RADIUS, 4 * Settings.TIMELINE_CIRCULAR_RADIUS);
            clockTarget = new RenderTarget2D(graphicsDevice, 4 * Settings.TIMELINE_CIRCULAR_RADIUS, 4 * Settings.TIMELINE_CIRCULAR_RADIUS, false, graphicsDevice.DisplayMode.Format, DepthFormat.Depth24, 16, RenderTargetUsage.PlatformContents);

            // Initialize x-position array
            if (Settings.TIMELINE_MONTHNAME_STATIC)
            {
                Settings.TIMELINE_MONTHNAME_EDGE_TRANSITION_WIDTH = 0;
                Settings.TIMELINE_MONTHNAME_BLANK_EDGE_WIDTH = 0;
                Settings.TIMELINE_MONTHNAME_CENTER_WIDTH = Settings.TIMELINE_MONTHNAME_STATIC_SPACING;
                Settings.TIMELINE_MONTHNAME_CENTER_TRANSITION_WIDTH = Settings.TIMELINE_MONTHNAME_CENTER_WIDTH/2;
                int startX = (Settings.RESOLUTION_X - 11 * Settings.TIMELINE_MONTHNAME_STATIC_SPACING) / 2;
                for (int i = 0; i < 12; i++)
                {
                    staticXPositions[i] = startX + i * Settings.TIMELINE_MONTHNAME_STATIC_SPACING;
                }
            }

            // Choose which set of month names to use
            this.monthNames = MonthNamesShort;
        }
コード例 #4
0
ファイル: Menu.cs プロジェクト: charbean/StrategyClean
        public override void LoadContent()
        {
            #region loadContent
            background = content.Load<Texture2D>("MetalBack");
            base.screentitle = "MENU SCREEN, CLICK PLAY";
            BackgroundMusic = content.Load<Song>("MusicLoop1");
            video = content.Load<Video>("MenuBackgroundVid");
            videoPlayer = new VideoPlayer();
            videoPlayer.IsMuted = true;
            MediaPlayer.Volume = MusicVolume;

            MediaPlayer.Play(BackgroundMusic);

            menu = new MenuClass(graphics, device, content, game, new EventHandler(NewGame), new EventHandler(QuitGame));
            

            //menuThud = content.Load<SoundEffect>("Sound/MenuThud");
            //clickNoise = content.Load<SoundEffect>("Sound/ClickNoise1");
            #endregion

            videoOpacity = 0.15f;

           ListOfSaves = user.LoadListOfSaves();
           menu.LoadContent();

        }
コード例 #5
0
ファイル: Intro.cs プロジェクト: Team-Dojo/Dojo
 public override void Unload()
 {
     video = null;
     videoPlayer = null;
     videoTexture = null;
     //base.Unload();
 }
コード例 #6
0
        private VideoManager()
        {
            video = EvilutionGame.SContent.Load<Video>("video\\Birth of the earth");
            Font = FontManager.LoadFont("font/menuItems");

            videoPlayer = new VideoPlayer();
        }
コード例 #7
0
ファイル: Game1.cs プロジェクト: TELL-G/ZombieSurvival
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            //Bildschirmeinstellungen festlegen
            this.graphics.PreferredBackBufferWidth = 800;
            this.graphics.PreferredBackBufferHeight = 600;
            this.graphics.IsFullScreen = false;
            gameStatics.GameDimensions = new int[] { this.graphics.PreferredBackBufferWidth, this.graphics.PreferredBackBufferHeight };

            //Grafik:
            gameStatics.GameGraphicObject = new GraphicObject();
                //Schrift
            gameStatics.FontObject = new FontObject(1000);
            //Spielfenster:
            ActualGame = new actualGame();
            ActualGame.setDraw(true);

            //Hauptmenü
            MainScreen = new mainScreen();

            //Intro
            introPlayer = new VideoPlayer();
        }
コード例 #8
0
ファイル: Game1.cs プロジェクト: JesterScribble/MonoGame
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            player = new VideoPlayer(this);

            base.Initialize ();
        }
コード例 #9
0
ファイル: GameVideo.cs プロジェクト: robertg/Soar
 public GameVideo(Video video)
 {
     _video = video;
      _videoPlayer = new VideoPlayer();
      kinput = new KeyboardInput();
      gInput = new GamePadInput();
 }
コード例 #10
0
ファイル: IntroScreen.cs プロジェクト: wiilinkpds/Wotrn
 public IntroScreen()
 {
     XactManager.CurrentSong.Stop(AudioStopOptions.Immediate);
     intro = MainGame.GetInstance().Content.Load<Video>("Video\\Introduction");
     videoPlayer = new VideoPlayer();
     videoPlayer.Play(intro);
 }
コード例 #11
0
ファイル: EndGame.cs プロジェクト: RonyOCuinn/Over-The-Top
        public EndGame(ContentManager content)
        {
            _video = content.Load<Video>(@"Movies\EndGame");
            _endGameFont = content.Load<SpriteFont>(@"Fonts\MenuFont");

            _videoPlayer = new VideoPlayer();
        }
コード例 #12
0
ファイル: VideoAnimation.cs プロジェクト: ruizz/PangTang
 /*
  * Constructor
  */
 public VideoAnimation(Rectangle windowAreaRectangle, Video video)
 {
     this.windowAreaRectangle = windowAreaRectangle;
     this.video = video;
     videoPlayer = new VideoPlayer();
     videoPlayer.IsLooped = false;
 }
コード例 #13
0
 public override void LoadContent()
 {
     base.LoadContent();
     video = ScreenManager.Game.Content.Load<Video>("Video\\intro");
     videoPlayer = new VideoPlayer();
     videoPlayer.IsLooped = true;
 }
コード例 #14
0
ファイル: RhythmGame.cs プロジェクト: brianfaires/Fortissimo
        protected override void LoadContent()
        {
            SpriteBatch = new SpriteBatch(GraphicsDevice);
            base.LoadContent();

            _defaultSong          = new SongDataPlus();
            _defaultSong.type     = SongDataPlus.NoteType.GBA;
            _defaultSong.dirPath  = "";// TITLE_LOCATION;
            _defaultSong.songData = new SongData();
            _defaultSong.songData.info.filename = "Default";

            String aviPath = Path.Combine(/*TITLE_LOCATION,*/ "Intro.avi");

            try
            {                      /*
                                    * introVideo = new Microsoft.Xna.Framework.Media.VideoPlayer(aviPath, GraphicsDevice);
                                    * introVideo.OnVideoComplete += new EventHandler(MovieFinished);
                                    * introVideo.Play();
                                    * ChangeState(GameStateType.IntroMovie);*/
                introVideo = null; // 4.0change
            }
            catch (Exception)
            {
                introVideo = null;
            }
        }
コード例 #15
0
ファイル: MSIntroScreen.cs プロジェクト: verngutz/MoodSwing
 private MSIntroScreen()
     : base(null, MoodSwing.GetInstance().SpriteBatch, MoodSwing.GetInstance())
 {
     videoPlayer = new VideoPlayer();
     this.LoadContent();
     HasFocus = true;
 }
コード例 #16
0
 public XnaVideo(string filename, XnaMedia.VideoPlayer player, XnaDevice graphicsDevice,
                 SoundDevice soundDevice)
     : base(filename, soundDevice)
 {
     this.player         = player;
     this.graphicsDevice = graphicsDevice;
     image = new VideoImage(graphicsDevice);
 }
コード例 #17
0
 public VideoReader(string assetname, Scene next = Scene.Titre)
 {
     this._assetName = assetname;
     this._player = new VideoPlayer();
     this._next = next;
     this._windowSize = new Rectangle();
     this._timer = 0;
 }
コード例 #18
0
 static public void Load(ContentManager Content)
 {
     start = Content.Load<Video>("scenes/start");
     intro = Content.Load<Video>("scenes/intro");
     final = Content.Load<Video>("scenes/bossfight");
     credits = Content.Load<Video>("scenes/credits");
     player = new VideoPlayer();
 }
コード例 #19
0
 protected override void LoadContent()
 {
     spriteBatch = new SpriteBatch(GraphicsDevice);
     Services.AddService(typeof(SpriteBatch), spriteBatch);
     video = Content.Load<Video>("Video\\Intro");
     videoplayer = new VideoPlayer();
     videoplayer.Play(video);
 }
コード例 #20
0
ファイル: VideoManager.cs プロジェクト: frank44/pewpew
 /// <summary>  
 /// Video manager lets you add a video and play and stop and such  
 /// </summary>  
 /// <param name="content">pass in content from game1.cs class</param>  
 /// <param name="videoFileLocation">full string file path</param>  
 /// <param name="Position">position to play video, using 0,0 as origin</param>  
 /// <param name="Scale">scale of the video</param>  
 /// <param name="Loop">bool to tell weather or not to loop the video</param>  
 public VideoManager(ContentManager content, string videoFileLocation, Vector2 Position, Vector2 Scale, bool Loop)
 {
     video = content.Load<Video>(videoFileLocation);
     videoPlayer = new VideoPlayer();
     loop = Loop;
     scale = Scale;
     position = Position;
 }
コード例 #21
0
ファイル: VideoManager.cs プロジェクト: poz2k4444/TDA3Engine
        public VideoManager(ContentManager content, string dir)
        {
            Content = content;
            ContentFolder = dir;
            singleton = this;

            Player = new VideoPlayer();
        }
コード例 #22
0
 public VideoSplashScreen(Game game, TimeSpan dur)
     : base(game)
 {
     videoPlayer = new VideoPlayer();
     viewRec = new Rectangle(0, 0, Resolution.getResolution().X,
         Resolution.getResolution().Y);
     duration = dur;
 }
コード例 #23
0
 public override void Initialize()
 {
     if (player == null)
     {
         player = new VideoPlayer();
         player.IsLooped = false;
     }
 }
コード例 #24
0
        /// <summary>
        /// Load graphics content for the screen.
        /// </summary>
        /// <param name="GraphicInfo"></param>
        /// <param name="factory"></param>
        /// <param name="contentManager"></param>
        protected override void  LoadContent(Engine.GraphicInfo GraphicInfo, Engine.GraphicFactory factory, IContentManager contentManager)
        {
             base.LoadContent(GraphicInfo, factory, contentManager);            
             videoPlayer = new VideoPlayer();
             myVideoFile = contentManager.GetAsset<Video>(location);            
             videoPlayer.IsLooped = false;            

        }
コード例 #25
0
 public void initialize(ContentUtil content, SceneActivationParameters parameters)
 {
     this.video = content.load<Video>(this.videoName);
     this.player = null;
     this.size = new Rectangle(0, 0, 0, 0);
     this.forceExit = false;
     this.firstUpdate = true;
 }
コード例 #26
0
        public override void Activate()
        {
            base.Activate();
            videoPlayer = new VideoPlayer();
            logoVideo = V2DGame.instance.Content.Load<Video>(@"DDWLogoMovie");

            videoPlayer.Play(logoVideo);
            started = true;
        }
コード例 #27
0
ファイル: Demo.cs プロジェクト: furaga/Rittai3rd
 public void Initialize()
 {
     video = GLOBAL.game1.Content.Load<Video>("Demo");
     videoPlayer = new VideoPlayer();
     videoPlayer.IsLooped = true;
     videoPlayer.IsMuted = false;
     videoPlayer.Play(video);
     flag_exit = false;
 }
コード例 #28
0
ファイル: Game1.cs プロジェクト: drumhellar/Game1
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            titleVideo = Content.Load<Video>(@"titleVideo");

            videoPlayer = new VideoPlayer();
            // TODO: use this.Content to load your game content here
        }
コード例 #29
0
        public override void LoadContent()
        {
            video = ScreenManager.Game.Content.Load<Video>("Video\\splash");
            videoPlayer = new VideoPlayer();
            videoPlayer.IsLooped = false;

            if (videoPlayer.State != MediaState.Playing)
                videoPlayer.Play(video);
        }
コード例 #30
0
ファイル: Controller.cs プロジェクト: colincapurso/LD25
 public Controller()
     : base()
 {
     IntroVideo = Game1.ContentLoader.Load<Video>("Video/JenStory");
       Player = new VideoPlayer();
       Player.Play(IntroVideo);
       Player.IsLooped = false;
       Player.Volume = Game1.GlobalVolume;
 }
コード例 #31
0
ファイル: VideoFinal.cs プロジェクト: Murillo/HumanInvaders
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(this.Game.GraphicsDevice);

            animacao = Game.Content.Load<Video>("Video/Filme");
            videoPlayer = new VideoPlayer();

            base.LoadContent();
        }
コード例 #32
0
        public void LoadContent(ContentManager content)
        {
            var graphics = GameService.GetService<GraphicsDeviceManager>();
            rectangle = new Rectangle(0, 0, graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight);

            video = content.Load<Video>("Videos/entrace");
            videoPlayer = new VideoPlayer();
            playVideo = true;
        }
コード例 #33
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // TODO: use this.Content to load your game content here
            font = Content.Load <SpriteFont> ("spriteFont1");

            video       = Content.Load <Video> ("sintel_trailer");
            videoPlayer = new Microsoft.Xna.Framework.Media.VideoPlayer();
            playVideo   = true;
        }
コード例 #34
0
ファイル: MediaPlayer.WMS.cs プロジェクト: pubstage/MonoGame
        private static void PlatformPlaySong(Song song)
        {
            // Cleanup the last song first.
            if (State != MediaState.Stopped)
            {
                _session.Stop();
                _session.ClearTopologies();
                _session.Close();
                _volumeController.Dispose();
                _clock.Dispose();
            }

            // Set the new song.
            _session.SetTopology(SessionSetTopologyFlags.Immediate, song.Topology);

            _volumeController              = CppObject.FromPointer <SimpleAudioVolume>(VideoPlayer.GetVolumeObj(_session));
            _volumeController.Mute         = _isMuted;
            _volumeController.MasterVolume = _volume;

            // Get the clock.
            _clock = _session.Clock.QueryInterface <PresentationClock>();

            //create the callback if it hasn't been created yet
            if (_callback == null)
            {
                _callback = new Callback();
                _session.BeginGetEvent(_callback, null);
            }

            // Start playing.
            var varStart = new Variant();

            _session.Start(null, varStart);
        }
コード例 #35
0
 public Callback(VideoPlayer player)
 {
     _player = player;
 }
コード例 #36
0
ファイル: RhythmGame.cs プロジェクト: brianfaires/Fortissimo
 public void MovieFinished(object sender, EventArgs e)
 {
     ChangeState(GameStateType.TitleScreen);
     introVideo.Dispose();
     introVideo = null;
 }