public override void Update(GameTime gameTime, Rectangle viewportRect)
        {
            ProcessInput();
            base.Update(gameTime, viewportRect);

            superTimer += (float)gameTime.ElapsedGameTime.Milliseconds / 1000;
            firetime += (float)gameTime.ElapsedGameTime.Milliseconds / 1000;

            Velocity *= 0.0f;
            screenCollide(viewportRect);

            if (currentSuper >= 25 && currentSuper < 35)
            {
                weapon = new RocketLauncher();
                weaponName = "Rockets";

            }

            if (currentSuper >= 50 && currentSuper < 55)
            {
                weapon = new laserbeam();
                weaponName = "LAZER BEAM";
            }

            if (currentSuper >= 65)
            {
                weapon = new novalauncher();
                weaponName = "NOVA";
            }

            if (superTimer >= 4.0f)
            {
                decrementSuper();
                superTimer = 0.0f;
            }

            if (currentSuper <= 0)
            {
                currentSuper = 0;
            }

        }
Esempio n. 2
0
        public override void Update(GameTime gameTime, Rectangle viewportRect)
        {
            ProcessInput();
            base.Update(gameTime, viewportRect);

            superTimer += (float)gameTime.ElapsedGameTime.Milliseconds / 1000;
            firetime   += (float)gameTime.ElapsedGameTime.Milliseconds / 1000;

            Velocity *= 0.0f;
            screenCollide(viewportRect);

            if (currentSuper >= 25 && currentSuper < 35)
            {
                weapon     = new RocketLauncher();
                weaponName = "Rockets";
            }

            if (currentSuper >= 50 && currentSuper < 55)
            {
                weapon     = new laserbeam();
                weaponName = "LAZER BEAM";
            }

            if (currentSuper >= 65)
            {
                weapon     = new novalauncher();
                weaponName = "NOVA";
            }

            if (superTimer >= 4.0f)
            {
                decrementSuper();
                superTimer = 0.0f;
            }

            if (currentSuper <= 0)
            {
                currentSuper = 0;
            }
        }