Beispiel #1
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>


        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        ///
        #region LoadContent
        public override void LoadContent(ContentManager Content)
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            forward.LoadContent(Content);
            ballobjectengine.LoadContent(Content);
            scrollingbackgroundbottom.LoadContent(Content);
            scrollingbackgroundtop.LoadContent(Content);
            //homebase.LoadContent(Content);
            masterbackground     = Content.Load <Texture2D>("PlayVideoStage/backgrounds/background01");
            masterbackgroundrect = new Rectangle(0, 0, 800, 600);
            timer.LoadContent(Content);
            scoretext = Content.Load <Texture2D>("PlayVideoStage/score/scoretext");
            //
            spriteFont = Content.Load <SpriteFont>("PlayVideoStage/content/Font1");

            validationobjectengine.LoadContent(Content);
            //<< graphics >>> background after game falls

            gWinBackground = Content.Load <Texture2D>("backgrounds/TitleScreen");
            gWinRect       = new Rectangle(800, 600, 800, 600);

            // << GRAPHICS >> LARGE FONT THAT DISPLAYS SCORE
            LargeFont = Content.Load <SpriteFont>("PlayVideoStage/content/LargeFont");
            // wronghands = Content.Load<Texture2D>("backgrounds/WRONGHANDS");
            fingertextures[0] = Content.Load <Texture2D>("PlayVideoStage/fingers/fingersall");
            fingertextures[1] = Content.Load <Texture2D>("PlayVideoStage/fingers/fingersall");
            fingertextures[2] = Content.Load <Texture2D>("PlayVideoStage/fingers/fingersall");
            fingertextures[3] = Content.Load <Texture2D>("PlayVideoStage/fingers/fingersall");
            fingertextures[4] = Content.Load <Texture2D>("PlayVideoStage/fingers/fingersall");
            //
            leapcollisionmax.X = 400;
            leapcollisionmax.Y = 800;

            leapcollisionmin.X = 0;
            leapcollisionmin.Y = 500;
            boom = Content.Load <SoundEffect>("PlayVideoStage/sound/boom");

            /* mainsong = Content.Load<Song>("music/mainsong");
             * MediaPlayer.Play(mainsong ); */
            SoundEffect.MasterVolume = 0.4f;
            leapcollisionrightmax.X  = 600;
            leapcollisionrightmax.Y  = 800;

            leapcollisionrightmin.X = 401;
            leapcollisionrightmin.Y = 500;

            #region Video

            // JESUS IS LORD!!! <<< VIDEO>>> JESUS IS LORD! THE VIDE WHERE GOKU WINS
            gokuPlayer        = new VideoPlayer();
            gokuVidRect       = new Rectangle(0, 0, 800, 600);
            gokuWinsVid       = Content.Load <Video>("PlayVideoStage/videos/opening");
            gokuPlayer.Volume = 1.0f;

            //gokuPlayer.Volume = 5;
            gokuPlayer.Play(gokuWinsVid);

            #endregion
            // TODO: use this.Content to load your game content here
        }
        /// <summary>
        /// Load texture for background
        /// </summary>
        /// <param name="level"></param>
        public void LoadMapContent(ContentManager content, GraphicsDevice gd)
        {
            if (background1 != null)
            {
                background1.LoadContent(content, gd.Viewport);
            }
            if (background2 != null)
            {
                background2.LoadContent(content, gd.Viewport);
            }
            if (background3 != null)
            {
                background3.LoadContent(content, gd.Viewport);
            }

            if (music != null)
            {
                music.Song = content.Load <Song>("sfx/Music/" + music.FileName);
            }

            foreach (BadGuy b in EnemyRessourcesToLoad)
            {
                b.LoadContent(content);
            }

            foreach (MySong s in MusicRessourcesToLoad)
            {
                s.Song = content.Load <Song>("sfx/Music/" + s.FileName);
            }
        }
Beispiel #3
0
        /// <summary>
        /// Load texture for background
        /// </summary>
        /// <param name="level"></param>
        public void LoadMapContent(TheGreatPaperGame Game)
        {
            Logger.Log(LogLevel.Info, "Loading map content");

            this.mapContentManager = new ContentManager(Game.Services);
            this.mapContentManager.RootDirectory = "Content";

            if (background1 != null)
            {
                background1.LoadContent(this.mapContentManager);
            }
            if (background2 != null)
            {
                background2.LoadContent(this.mapContentManager);
            }
            if (background3 != null)
            {
                background3.LoadContent(this.mapContentManager);
            }

            if (music != null)
            {
                music.Song = this.mapContentManager.Load <Song>("sfx/Music/" + music.FileName);
            }

            foreach (BadGuy b in EnemyRessourcesToLoad)
            {
                b.LoadContent(this.mapContentManager);
            }

            foreach (MySong s in MusicRessourcesToLoad)
            {
                s.Song = this.mapContentManager.Load <Song>("sfx/Music/" + s.FileName);
            }

            Logger.Log(LogLevel.Info, "Map content loaded !");
        }
        public override void LoadContent(ContentManager Content)
        {
            base.LoadContent(Content);
            #region LoadText
            //JESUS IS LORD <<< GRAPHICS >>> LOAD RESPECTIVE SPRITE FONTS FOR RESPECTIVE TEXT DISPLAY ON SCREEN JESUS IS LORD!
            if (font == null)
            {
                font = content.Load <SpriteFont>("content/Font1");
            }
            if (font2 == null)
            {
                font2 = content.Load <SpriteFont>("content/Font2");
            }
            #endregion

            //  backwardscode.LoadContent(Content);
            // JESUS IS LORD <<< CONTROL >>> INITIALIZE A BUNCH OF ARRAYS FOR USE WITH LOADING TEXTURES THROUGH FOR LOOP JESUS IS LORD
            #region ARRAYS OF TEXTURES GAME 18
            //   goku = new Texture2D[2];
            //  superman = new Texture2D[2];
            #endregion
            //hitsound = Content.Load<SoundEffect>("tokensuccess");
            leapcollisionb = new Rectangle(0, 0, 64, 64);
            backwards.LoadContent(Content);
            #region JESUS IS LORD GAME 18 LOADING TEXTURES IN ARRAYS JESUS IS LORD!
            //    computervirus = Content.Load<Texture2D>("backgrounds/computervirus");
            //  infectedcomputer = Content.Load<Texture2D>("backgrounds/infectedcomputer");

            /*
             * // JESUS IS LORD <<< GRAPHICS >>> LOAD SPRITES INTO ARRAYS superman and goku JESUS IS LORD!
             * for (int i = 0; i <= 2; i++)
             * {
             *  if (i == 0)
             *      goku[i] = Content.Load<Texture2D>("characters/goku");
             *  else if (i == 1)
             *      goku[i] = Content.Load<Texture2D>("characters/goku1");
             *
             * }
             *
             * for (int x = 0; x <= 2; x++)
             * {
             *  if (x == 0)
             *      superman[x] = Content.Load<Texture2D>("characters/superman");
             *  else if (x == 1)
             *      superman[x] = Content.Load<Texture2D>("characters/superman1");
             *
             * }
             *
             *
             * gokuRect = new Rectangle(0, 160, 130, 246);
             * supermanRect = new Rectangle(300, 10, 818, 614);
             *
             */

            #endregion
            //  scrollingbackgroundbottom.LoadContent(Content);
            //   scrollingbackgroundtop.LoadContent(Content);
            forward.LoadContent(Content);
            //kungfusantaclaus = Content.Load<Texture2D>("backgrounds/kungfusantaclaus");
            #region JESUS IS LORD LOADING BACKGROUND JESUS IS LORD

            /*fingertextures[0] = Content.Load<Texture2D>("fingers/finger1");
             * fingertextures[1] = Content.Load<Texture2D>("fingers/finger2");
             * fingertextures[2] = Content.Load<Texture2D>("fingers/finger3");
             * fingertextures[3] = Content.Load<Texture2D>("fingers/finger4");
             * fingertextures[4] = Content.Load<Texture2D>("fingers/finger5"); */
            //  wronghands = Content.Load<Texture2D>("backgrounds/WRONGHANDS");
            background     = Content.Load <Texture2D>("backgrounds/TitleScreen");
            backgroundRect = new Rectangle(0, 0, 800, 600);

            #endregion

            deepestmasterofcode = Content.Load <Texture2D>("backgrounds/deepestmaster");
            #region JESUS IS LORD <<< SOUND >>> SONGS AND SOUND EFFECTS FOR GAME

            backgroundMusic = Content.Load <Song>("music/bgmusic01");

            //  MediaPlayer.Volume = 0.2f;
            MediaPlayer.Play(backgroundMusic);

            // slice = Content.Load<SoundEffect>("sound/slice");
            // explosion = Content.Load<SoundEffect>("sound/explosion");
            // beatUp = Content.Load<SoundEffect>("sound/beatup");
            #endregion

            #region EFFECTS JESUS IS LORD!

            // JESUS IS LORD << DRAWS EFFECTS AND LIGHTNING AND SUCH JESUS IS LORD!@
            //    blueLight = Content.Load<Texture2D>("effects/JESUSISLORDbluelight");
            //   redLight = Content.Load<Texture2D>("effects/JESUSISLORDredlight");

            //  redRect = new Rectangle(0, 200, 132, 132);
            //   blueRect = new Rectangle(650, 200, 132, 132);
            #endregion

            //  virusvideo = Content.Load<Video>("videos/viruscountdown");
            //   virusplayer.Play(virusvideo);
        }