Exemplo n.º 1
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);

            p.Load(Content);
            hud.Load(Content);
            intro.Load(Content, graphics);
            oMenu.Load();
            background = new Background(GraphicsDevice, Content);
            loadingScreen = new LoadingScreen(Content, graphics.GraphicsDevice);

            foreach (Weapon wep in p.weapList)
            {
                wep.Load(Content, p.GetDirection());
            }
        }
Exemplo n.º 2
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);
            structOptionsMain = new StructOptionsMain();
            structOptionsMain.Graphics = graphics;
            structOptionsMain.Content = Content;
            structOptionsMain.SpriteBatch = spriteBatch;
            structOptionsMain.SpriteFont = Content.Load<SpriteFont>("MenuFont");
            structOptionsMain.Ch = ch;
            oMenu = new OptionsMenu(structOptionsMain);

            p.Load(Content);
            p.SetPlayerPos(spriteBatch);
            hud.Load(Content);
            intro.Load(Content, graphics);
            credit.Load(Content, graphics);
            oMenu.Init();
            gameOverMenu.Load();
            shield.Load();
            pickUp.Load(Content);
            if (spawnPickup >= 70)
            {
                pickUp.Load(Content);
            }
            machineGun.Load();
            extraLife.Load();

            speedUp.Load();

            mainMenu.Load(graphics.GraphicsDevice, scores);
            background = new Background(GraphicsDevice, Content);
            loadingScreen = new LoadingScreen(Content, graphics.GraphicsDevice);
            kbm.Load();

            foreach (Weapon wep in p.weapList)
            {
                wep.Load(Content, p.GetDirection());
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            player = new Sprite(graphics, Content.Load<Texture2D>("playerShip"));

            alien = new Alien(Content, graphics, player);

            spriteBatch = new SpriteBatch(GraphicsDevice);
            background = new Background(graphics.GraphicsDevice, spriteBatch, Content);
            bullets = new BulletList();
            asteroids = new Asteroid(Content, graphics);
            keyboard = new KeyBoardManager(Content);
            collision = new Collision(player, alien, bullets, asteroids);

            font = Content.Load<SpriteFont>("Font");
        }
Exemplo n.º 4
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);

            p.Load(Content);
            p.SetPlayerPos(spriteBatch);
            hud.Load(Content);
            mainMenu = new MainMenu(Content, graphics, ch);
            intro.Load(Content, graphics);
            oMenu.Load();
            mainMenu.Load(Content, graphicsDevice);
            background = new Background(GraphicsDevice, Content);
            loadingScreen = new LoadingScreen(Content, graphics.GraphicsDevice);
            alien = new Alien(Content.Load<Texture2D>("AlienShip"), new Vector2(50, 100), Vector2.Zero, 0f, 2f, Content.Load<Texture2D>("AlienBullet"));

            foreach (Weapon wep in p.weapList)
            {
                wep.Load(Content, p.GetDirection());
            }
        }
Exemplo n.º 5
0
        public void Init()
        {
            //STRUCT CHECKBOX
            structCheckBox = new StructCheckBox();
            graphics.PreferMultiSampling = structCheckBox.StateCheckBox;
            graphics.ApplyChanges();
            this.spriteFont = structOptionsMain.SpriteFont;

            //SONG CONFIG
            //song = Content.Load<Song>("Ismo_Kan_Niet_Hangen_Met_Je");
            //MediaPlayer.Play(song);
            MediaPlayer.Volume = 1f;

            //STRUCT SOUND
            strucSound = new StructSound();
            strucSound.PosArrowLeft = new Vector2(2.64f, 3.17f);
            strucSound.TxSoundBar = Content.Load<Texture2D>("SoundBar");
            strucSound.TxSoundBarCursor = Content.Load<Texture2D>("SoundBarCursor");
            strucSound.TxArrowLeft = Content.Load<Texture2D>("ArrowLeft");
            strucSound.TxArrowRight = Content.Load<Texture2D>("ArrowRight");
            strucSound.PosSoundBar = new Vector2(2.34f, 2.6f);
            strucSound.PosSoundBarCursor = new Vector2(1.77f, 3.30f);
            strucSound.PosArrowLeft = new Vector2(2.65f, 3.17f);
            strucSound.PosArrowRight = new Vector2(1.53f, 3.17f);
            strucSound.SizeArrow = new Vector2(43, 35);
            strucSound.SizeSoundBar = new Vector2(200, 10);
            strucSound.SizeSoundBarCursor = new Vector2(22, 35);
            tSound = new TSoundOption(structOptionsMain, strucSound);

            //STRUCT RESOLUTION
            structResolution = new StructResolution();
            structResolution.TxResolutionBar = Content.Load<Texture2D>("ResolutionBar");
            structResolution.TxArrowLeft = Content.Load<Texture2D>("ArrowLeft");
            structResolution.TxArrowRight = Content.Load<Texture2D>("ArrowRight");
            structResolution.PosArrowLeft = new Vector2(2.65f, 2.5f);
            structResolution.PosArrowRight = new Vector2(1.53f, 2.5f);
            structResolution.PosResolutionBar = new Vector2(2.35f, 2.5f);
            structResolution.SizeArrow = new Vector2(43, 35);
            structResolution.SizeResolutionBar = new Vector2(200, 35);
            tResolution = new TResolutionOption(structOptionsMain, structResolution);
            //R.I.P. -> tResolution = new TResolutionOption(graphics, txResolutionBar, txArrowLeft, txArrowRight, posResolutionBar, sizeResolutionBar, posArrowLeft, posArrowRight, sizeArrow, Color.White);

            //STRUCT CHECKBOX
            structCheckBox.TxCheckedBox = Content.Load<Texture2D>("CheckboxTrue");
            structCheckBox.TxUnCheckedBox = Content.Load<Texture2D>("CheckboxFalse");
            structCheckBox.PosCheckBoxLeft = new Vector2(2.63f, 2);
            structCheckBox.PosCheckBoxRight = new Vector2(1.67f, 2);
            structCheckBox.VecSizeCheckBox = new Vector2(35, 35);
            cbAlias = new TCheckBoxOption(structOptionsMain, structCheckBox);
            //R.I.P. -> cbAlias = new TCheckBoxOption(graphics, checkedBox, unCheckedBox, posCheckBoxLeft, posCheckBoxRight, vecSizeCheckBox, stateCheckBox, Color.White);

            //STRUCT OPTIONS TEXT
            structOptionsText.TxBack = Content.Load<Texture2D>("Back");
            structOptionsText.TxKeybindings = Content.Load<Texture2D>("Keybindings");
            structOptionsText.TxSelectArrow = Content.Load<Texture2D>("SelectArrow");
            structOptionsText.TextHeader = "JUST ANOTHER OPTIONS MENU";
            structOptionsText.TextSound = "SOUND";
            structOptionsText.TextResolution = "RESOLUTION";
            structOptionsText.TextAlias = "ANTI ALIASING";
            structOptionsText.TextAliasOn = "ON";
            structOptionsText.TextAliasOff = "OFF";
            structOptionsText.PosBack = new Vector2(2.1f, 1.5f);
            structOptionsText.PosKeybindings = new Vector2(2.3f, 1.7f);
            structOptionsText.PosHeader = new Vector2(2.9f, 5f);
            structOptionsText.PosSelectArrow = new Vector2(22f, 3.3f);
            structOptionsText.PosSound = new Vector2(3.80f, 3.2f);
            structOptionsText.PosResolution = new Vector2(5.8f, 2.5f);
            structOptionsText.PosAlias = new Vector2(8.3f, 2f);
            structOptionsText.PosAliasOn = new Vector2(2.35f, 2f);
            structOptionsText.PosAliasOff = new Vector2(1.55f, 2f);
            structOptionsText.SizeBack = new Vector2(65, 20);
            structOptionsText.SizeKeybindings = new Vector2(172, 20);
            structOptionsText.SizeSelectArrow = new Vector2(46, 46);
            oText = new OptionsText(structOptionsMain, structOptionsText);
            //R.I.P. -> oText = new OptionsText(graphics, txBackground, txBack, posBack, sizeBack, txSelectArrow, posSelectArrow, sizeSelectArrow, spriteFont, textHeader, posHeader, textSound, posSound, textResolution, posResolution, textAlias, posAlias, textAliasOn, posAliasOn, textAliasOff, posAliasOff, Color.White);

            //BACKGROUND
            bg = new Background(graphics.GraphicsDevice, Content);

            //INITIALIZE
            framesPassed = 0;
            selectedNumber = 0;
            tResolution.ChangeResolution(new Vector2(1024, 576));
        }