public override void LoadContent(ContentManager _content) { base.LoadContent(_content); video = LevelDataManager.tempContent.Load<Video>(@"Video\endwithtomato2"); player = new VideoPlayer(); player.Play(video); }
private MediaManager() { _musics = new Dictionary<string, Song>(); _sounds = new Dictionary<string, SoundEffect>(); _videoPlayer = new VideoPlayer(); CurrentSong = string.Empty; }
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; }
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(); }
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(); }
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(); }
/// <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 (); }
public GameVideo(Video video) { _video = video; _videoPlayer = new VideoPlayer(); kinput = new KeyboardInput(); gInput = new GamePadInput(); }
public IntroScreen() { XactManager.CurrentSong.Stop(AudioStopOptions.Immediate); intro = MainGame.GetInstance().Content.Load<Video>("Video\\Introduction"); videoPlayer = new VideoPlayer(); videoPlayer.Play(intro); }
public EndGame(ContentManager content) { _video = content.Load<Video>(@"Movies\EndGame"); _endGameFont = content.Load<SpriteFont>(@"Fonts\MenuFont"); _videoPlayer = new VideoPlayer(); }
/* * 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; }
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; } }
private MSIntroScreen() : base(null, MoodSwing.GetInstance().SpriteBatch, MoodSwing.GetInstance()) { videoPlayer = new VideoPlayer(); this.LoadContent(); HasFocus = true; }
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(); }
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); }
/// <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; }
public VideoManager(ContentManager content, string dir) { Content = content; ContentFolder = dir; singleton = this; Player = new VideoPlayer(); }
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; } }
/// <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; }
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; }
public override void Activate() { base.Activate(); videoPlayer = new VideoPlayer(); logoVideo = V2DGame.instance.Content.Load<Video>(@"DDWLogoMovie"); videoPlayer.Play(logoVideo); started = true; }
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; }
/// <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 }
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); }
public Controller() : base() { IntroVideo = Game1.ContentLoader.Load<Video>("Video/JenStory"); Player = new VideoPlayer(); Player.Play(IntroVideo); Player.IsLooped = false; Player.Volume = Game1.GlobalVolume; }
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; }
/// <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; }
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; }
public void MovieFinished(object sender, EventArgs e) { ChangeState(GameStateType.TitleScreen); introVideo.Dispose(); introVideo = null; }