/// <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
            scrollSpeed = defaultSpeed;

            //=============================================================
            //Background Texturing
            backTexture = Content.Load<Texture2D>("ui_background");
            backEndTexture = Content.Load<Texture2D>("ui_background_end");
            EndWinTexture = Content.Load<Texture2D>("EndingWin");
            EndWinBackgroundTexture = Content.Load<Texture2D>("EndScreen");
            EndLoseTexture = Content.Load<Texture2D>("EndingLose");
            EndDiedTexture = Content.Load<Texture2D>("EndingDied");
            EndTimeoutTexture = Content.Load<Texture2D>("TimeOut");
            PauseTexture = Content.Load<Texture2D>("Pause");
            //=============================================================

            //=============================================================
            //Gui Loading
            GUI.ButtonMenu1 = Content.Load<Texture2D>("button1");
            GUI.ButtonMenu2 = Content.Load<Texture2D>("button2");
            GUI.ButtonMenu3 = Content.Load<Texture2D>("button3");
            GUI.ButtonMenu4 = Content.Load<Texture2D>("button4");
            GUI.ButtonBack = Content.Load<Texture2D>("buttonback");
            PlayerIcon1 = Content.Load<Texture2D>("PlayerIcon1");
            PlayerIcon2 = Content.Load<Texture2D>("PlayerIcon2");
            PlayerIcon3 = Content.Load<Texture2D>("PlayerIcon3");
            PlayerIcon4 = Content.Load<Texture2D>("PlayerIcon4");
            GUI.ButtonBackward = Content.Load<Texture2D>("Buttonbackwards");
            GUI.ButtonForward = Content.Load<Texture2D>("Buttonnext");
            Gameguide = Content.Load<Texture2D>("Gameguide2");
            //=============================================================

            //=============================================================
            //Player Texturing
            playerTexture1 = Content.Load<Texture2D>("player_green");
            playerTexture2 = Content.Load<Texture2D>("player_blue");
            playerTexture3 = Content.Load<Texture2D>("player_red");
            playerTexture4 = Content.Load<Texture2D>("player_yellow");
            healthTexture = Content.Load<Texture2D>("health");
            wifiHudTexture = Content.Load<Texture2D>("wifi_hud");
            for (var i = 0; i < 10; i++)
                scoreTextures[i] = Content.Load<Texture2D>("hud_" + i.ToString());
            hudSepTexture = Content.Load<Texture2D>("hud_sep");
            clockHud = Content.Load<Texture2D>("timer_hud3d");
            pointsHud = Content.Load<Texture2D>("points_hud");
            PlayerIconTexture = PlayerIcon1;
            playerTexture = playerTexture1;
            player = new Player(playerTexture, new Vector2(graphics.PreferredBackBufferWidth / 2, graphics.PreferredBackBufferHeight / 2), WifiNeeded);

            //=============================================================

            //=============================================================
            //Enemy and Obstacle Texture
            enemyTexture = Content.Load<Texture2D>("enemy");
            obstacleTexture = Content.Load<Texture2D>("obstacle");
            //=============================================================

            //=============================================================
            //Collectable Texture
            collectWifiTexture = Content.Load<Texture2D>("wifi");
            collectPointsTexture = Content.Load<Texture2D>("points");
            collectHPLgeTexture = Content.Load<Texture2D>("coffee64");
            collectHPSmlTexture = Content.Load<Texture2D>("coffee32");
            collectBikeTexture = Content.Load<Texture2D>("bike");

            //=============================================================
        }
Beispiel #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);

            // TODO: use this.Content to load your game content here

            backTexture = Content.Load<Texture2D>("ui_background");
            background = new Background(backTexture, new Vector2(0, 0), secondsToComplete);
            playerTexture = Content.Load<Texture2D>("player_blue");
            player = new Player(playerTexture, new Vector2(graphics.PreferredBackBufferWidth / 2, graphics.PreferredBackBufferHeight / 2));
            EnemyTexture = Content.Load<Texture2D> ("Enemy");
        }
        public void ResetGameValues()
        {
            //basics
            TimerBegin = 0;
            highSpeed = false;

            //background
            background = new Background(backTexture, backEndTexture, new Vector2(0, 0), secondsToComplete, scrollSpeed);

            //player
            player = new Player(playerTexture, new Vector2(graphics.PreferredBackBufferWidth / 2, graphics.PreferredBackBufferHeight / 2), WifiNeeded);

            LostFromWifi = false;

            //collectables, enemies, obstacles
            enemies = new List<Enemy>();
            obstacles = new List<Obstacle>();
            collectables = new List<Collectable>();
            collectableSpawns = new List<CollectableSpawnDetail>();
            enemyspawntime = 5.0f;
            enemyspawncooldown = 0.0f;
            obstaclespawntime = 12.0f;
            obstaclespawncooldown = 0.0f;
            AddSpawnCollectables(Collectable.CollectType.WIFI, collectWifiSpawnCount);
            AddSpawnCollectables(Collectable.CollectType.POINTS, collectPointsSpawnCount);
            AddSpawnCollectables(Collectable.CollectType.HPSML, collectHPSmlSpawnCount);
            AddSpawnCollectables(Collectable.CollectType.HPLGE, collectHPLgeSpawnCount);
            AddSpawnCollectables(Collectable.CollectType.BIKE, collectBikeSpawnCount);

            //=============================================================
            //Timer
            speedTimer = new Timer(0, 0); //create a speed timer but don't leave it active
            speedTimer.TimerEnd = true;
            //=============================================================
        }