Exemplo n.º 1
0
        public void reset()
        {
            gameClock            = 1;
            currentShadowPathNum = -1;
            shadowPathStartTime  = 0;
            lightCooldown        = 0;

            //player.health = player.startingHealth;
            //shadowBoss.health = shadowBoss.startingHealth;
            shadowBoss = null;
            player     = null;
            player     = new Player(ref playerTexture,
                                    new Rectangle(200, 200, playerWidth, playerHeight));
            shadowBoss = new ShadowBoss(ref blankSquare,
                                        new Point(400, screenHeight / 2), ref player, ref guardRing);

            guardRing = new Ring(ref ringTexture,
                                 new Rectangle(200, 200, playerWidth, playerWidth), ref player, 2);


            shouldAddShadow = true;

            colorCountingUp = true;
            colorNum        = 30;

            currentShadowPathNum = -1;
            shadowPathStartTime  = 0;

            pathMaker.resetPos();
            shadowPathList.Clear();



            collectables.Clear();
        }
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);

            debugFont = Content.Load <SpriteFont>("debugFont");
            titleFont = Content.Load <SpriteFont>("titleFont");

            blankSquare   = Content.Load <Texture2D>("blankSquare");
            potionBottle  = Content.Load <Texture2D>("potionBottle");
            ringTexture   = Content.Load <Texture2D>("greenLightBall");
            playerTexture = Content.Load <Texture2D>("snakePlayer2");
            bandana       = Content.Load <Texture2D>("bandana2");

            backgroundMusic = Content.Load <Song>("snakeBoss3");

            player = new Player(ref playerTexture,
                                new Rectangle(200, 200, playerWidth, playerHeight));

            //collectableItem = new Collectable(ref potionBottle,
            //    new Rectangle(200, 200, playerWidth, playerWidth), ref player);



            guardRing = new Ring(ref ringTexture,
                                 new Rectangle(-1200, 200, playerWidth, playerWidth), ref player, 2);

            playerHealthBar = new HealthBar(ref blankSquare, new Rectangle(30, screenHeight - 60, 200, 35), 5);
            bossHealthBar   = new HealthBar(ref blankSquare, new Rectangle(screenWidth / 2 + 30, screenHeight - 60, 400, 35), 5);

            pathMaker = new Enemy(ref blankSquare,
                                  new Rectangle(screenWidth - 10, screenHeight - playerWidth - 20, playerWidth, playerWidth));

            pathMaker.speed = 2;

            shadowBoss = new ShadowBoss(ref blankSquare,
                                        new Point(400, screenHeight / 2), ref player, ref guardRing);

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