Exemple #1
0
        /// <summary>
        /// This is used create multiple coins at random locations
        /// </summary>
        private void SetupCoins()
        {
            Texture2D coinSheet = Content.Load <Texture2D>("images/coin_copper");

            coinsController.CreateCoin(graphicsDevice, coinSheet);
            coinsController.CreateCoin(graphicsDevice, coinSheet);
            coinsController.CreateCoin(graphicsDevice, coinSheet);
            coinsController.CreateCoin(graphicsDevice, coinSheet);
            coinsController.CreateCoin(graphicsDevice, coinSheet);
        }
Exemple #2
0
        /// <summary>
        /// Use Content to load your game images, fonts.
        /// </summary>
        protected override void LoadContent()
        {
            spriteBatch     = new SpriteBatch(GraphicsDevice);
            backgroundImage = Content.Load <Texture2D>(
                "backgrounds/green_background720p");

            // Load Content

            SoundController.LoadContent(Content);

            // Load Fonts

            arialFont   = Content.Load <SpriteFont>("fonts/arial");
            calibriFont = Content.Load <SpriteFont>("fonts/calibri");

            // Load buttons, player and enemy sprites

            SetupButtons();
            SetupAnimatedPlayer();
            SetupEnemy();

            Texture2D coinSheet = Content.Load <Texture2D>("Actors/coin_copper");

            coinsController.CreateCoin(graphicsDevice, coinSheet);
        }
        /// <summary>
        /// use Content to load your game images, fonts,
        /// music and sound effects
        /// </summary>
        protected override void LoadContent()
        {
            spriteBatch     = new SpriteBatch(GraphicsDevice);
            backgroundImage = Content.Load <Texture2D>(
                "images/green_background720p");

            // Load Music and SoundEffects

            SoundController.LoadContent(Content);
            SoundController.PlaySong("Adventure");
            flameEffect = SoundController.GetSoundEffect("Flame");

            // Load Fonts

            arialFont   = Content.Load <SpriteFont>("arial");
            calibriFont = Content.Load <SpriteFont>("Verdana");

            // suitable for asteroids type game

            SetupSpaceShip();
            SetupAsteroid();

            // animated sprites suitable for pacman type game

            SetupAnimatedPlayer();
            SetupEnemy();

            Texture2D coinSheet = Content.Load <Texture2D>("images/coin_copper");

            coinsController.CreateCoin(graphicsDevice, coinSheet);
        }
        public async Task CreateCoin_ReturnsBadRequestResponse_GivenNoCoin()
        {
            //Act
            var response = await _controller.CreateCoin(null, null);

            //Assert
            Assert.IsType <BadRequestResult>(response);
        }
Exemple #5
0
        /// <summary>
        /// use Content to load your game images, fonts,
        /// music and sound effects
        /// </summary>
        protected override void LoadContent()
        {
            // Load Background

            spriteBatch     = new SpriteBatch(GraphicsDevice);
            backgroundImage = Content.Load <Texture2D>(
                "backgrounds/green_background720p");

            // Load Music and SoundEffects

            SoundController.LoadContent(Content);
            SoundController.PlaySong("Adventure");
            flameEffect = SoundController.GetSoundEffect("Flame");

            // Load Fonts

            arialFont   = Content.Load <SpriteFont>("fonts/arial");
            calibriFont = Content.Load <SpriteFont>("fonts/calibri");

            restartButton = new Button(arialFont,
                                       Content.Load <Texture2D>("Controls/button-icon-png-200"))
            {
                Position = new Vector2(1140, 630),
                Text     = "Quit",
                Scale    = 0.6f
            };

            restartButton.click += RestartButton_click;

            // suitable for asteroids type game

            //SetupSpaceShip();

            SetupAsteroid();

            // animated sprites suitable for pacman type game

            SetupAnimatedPlayer();
            SetupEnemy();

            Texture2D coinSheet = Content.Load <Texture2D>("Actors/coin_copper");

            coinsController.CreateCoin(graphicsDevice, coinSheet);
        }