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
        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();
 }
        private VideoManager()
        {
            video = EvilutionGame.SContent.Load<Video>("video\\Birth of the earth");
            Font = FontManager.LoadFont("font/menuItems");

            videoPlayer = new VideoPlayer();
        }
예제 #7
0
        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
        /// <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
 public IntroScreen()
 {
     XactManager.CurrentSong.Stop(AudioStopOptions.Immediate);
     intro = MainGame.GetInstance().Content.Load<Video>("Video\\Introduction");
     videoPlayer = new VideoPlayer();
     videoPlayer.Play(intro);
 }
예제 #11
0
        public EndGame(ContentManager content)
        {
            _video = content.Load<Video>(@"Movies\EndGame");
            _endGameFont = content.Load<SpriteFont>(@"Fonts\MenuFont");

            _videoPlayer = new VideoPlayer();
        }
예제 #12
0
 /*
  * Constructor
  */
 public VideoAnimation(Rectangle windowAreaRectangle, Video video)
 {
     this.windowAreaRectangle = windowAreaRectangle;
     this.video = video;
     videoPlayer = new VideoPlayer();
     videoPlayer.IsLooped = false;
 }
 public override void LoadContent()
 {
     base.LoadContent();
     video = ScreenManager.Game.Content.Load<Video>("Video\\intro");
     videoPlayer = new VideoPlayer();
     videoPlayer.IsLooped = true;
 }
예제 #14
0
        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
 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);
 }
 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;
 }
 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
 /// <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
        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;
 }
 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
 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
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(this.Game.GraphicsDevice);

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

            base.LoadContent();
        }
        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
        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);
        }
 public Callback(VideoPlayer player)
 {
     _player = player;
 }
예제 #36
0
 public void MovieFinished(object sender, EventArgs e)
 {
     ChangeState(GameStateType.TitleScreen);
     introVideo.Dispose();
     introVideo = null;
 }