Esempio n. 1
0
        public Level1(ContentManager content, SpriteBatch sb)
        {
            levelEnded   = false;
            lastShot     = false;
            lastCharge   = false;
            this.content = content;
            spriteBatch  = sb;
            geometry     = this.content.Load <Model>(@"levels/level1");
            levelTexture = this.content.Load <Texture2D>(@"textures/levelTexture");
            position     = new Vector3(-45, -755, 8200);
            timeToResume = TimeSpan.FromSeconds(timeToResumeSeconds);

            switchedToBoss     = false;
            switchedToMiniBoss = false;
            switchedToStart    = false;
            switchedToClot     = false;

            startGameZ   = 7645;
            infectorZ    = 2800;
            clotZ        = 2200;
            thirdPersonZ = 650;
            preBossZ     = 1300;

            reachedClotZ      = false;
            infectorAdded     = false;
            reachedPreBossZ   = false;
            infectorDestroyed = false;
            movePreInfector   = false;

            endingMove1 = endingMove2 = endingMove3 = false;

            velocity      = Vector3.Zero;
            firstMove     = false;
            secondMove    = false;
            thirdMove     = false;
            fourthMove    = false;
            rotatedBehind = false;
            fifthMove     = false;
            beginDescentZ = -430;

            reachedBoss  = false;
            enemySpawner = new EnemySpawner(1, content);
            bossAdded    = false;
            clotsAdded   = false;
            firstStart   = false;

            introRot1 = false;
            introRot2 = false;
            introRot3 = false;
            introRot4 = false;

            thirdPersonRot    = false;
            thirdPersonTrans  = false;
            setRot            = false;
            setTrans          = false;
            returnedToTopDown = false;
            enemiesReenabled  = false;

            miniBoss  = new Infector(content, new Vector3(0, 0, 250));
            rightClot = new ClotSide(content, new Vector3(-60, 0, 20), Side.Right);
            leftClot  = new ClotSide(content, new Vector3(60, 0, 20), Side.Left);

            preloadedStraightCell = new StraightCell(content, new Vector3(0, 500, 0));
            preloadedLatchingCell = new LatchingCell(content, new Vector3(0, 500, 0), Vector3.Zero);
            preloadedChargingCell = new ChargingCell(content, new Vector3(0, 500, 0), Vector3.Zero);
            preloadedMeleeBot     = new MeleeBot(content, new Vector3(0, 500, 0), Vector3.Zero);
            preloadedMissileBot   = new MissileBot(content, new Vector3(0, 500, 0), Vector3.Zero);
            preloadedTokenPickup  = new TokenPickup(content, new Vector3(0, 500, 0));
            preloadedMissile      = new Missle(content, Vector3.Zero, Vector3.Zero);
            preloadedBotMissile   = new BotMissile(content, Vector3.Zero, Vector3.Zero);
            preloadedNeedle       = new Needle(content, Vector3.Zero, Vector3.Zero);
            preloadedLaser        = new Laser(content, Vector3.Zero, Vector3.Zero);
            preloadedExplosion    = new Explosion(0, 0, 0, Vector3.Zero, content, false);
            preloadedChargeBall   = new ChargeBall(content, Vector3.Zero);

            clotsDestroyed = false;

            Camera.Instance.setPosition(new Vector3(-7, 7, 7));
        }
        public Level1(ContentManager content, SpriteBatch sb)
        {
            levelEnded = false;
            lastShot = false;
            lastCharge = false;
            this.content = content;
            spriteBatch = sb;
            geometry = this.content.Load<Model>(@"levels/level1");
            levelTexture = this.content.Load<Texture2D>(@"textures/levelTexture");
            position = new Vector3(-45, -755, 8200);
            timeToResume = TimeSpan.FromSeconds(timeToResumeSeconds);

            switchedToBoss = false;
            switchedToMiniBoss = false;
            switchedToStart = false;
            switchedToClot = false;

            startGameZ = 7645;
            infectorZ = 2800;
            clotZ = 2200;
            thirdPersonZ = 650;
            preBossZ = 1300;

            reachedClotZ = false;
            infectorAdded = false;
            reachedPreBossZ = false;
            infectorDestroyed = false;
            movePreInfector = false;

            endingMove1 = endingMove2 = endingMove3 = false;

            velocity = Vector3.Zero;
            firstMove = false;
            secondMove = false;
            thirdMove = false;
            fourthMove = false;
            rotatedBehind = false;
            fifthMove = false;
            beginDescentZ = -430;

            reachedBoss = false;
            enemySpawner = new EnemySpawner(1, content);
            bossAdded = false;
            clotsAdded = false;
            firstStart = false;

            introRot1 = false;
            introRot2 = false;
            introRot3 = false;
            introRot4 = false;

            thirdPersonRot = false;
            thirdPersonTrans = false;
            setRot = false;
            setTrans = false;
            returnedToTopDown = false;
            enemiesReenabled = false;

            miniBoss = new Infector(content, new Vector3(0, 0, 250));
            rightClot = new ClotSide(content, new Vector3(-60, 0, 20), Side.Right);
            leftClot = new ClotSide(content, new Vector3(60, 0, 20), Side.Left);

            preloadedStraightCell = new StraightCell(content, new Vector3(0, 500, 0));
            preloadedLatchingCell = new LatchingCell(content, new Vector3(0, 500, 0), Vector3.Zero);
            preloadedChargingCell = new ChargingCell(content, new Vector3(0, 500, 0), Vector3.Zero);
            preloadedMeleeBot = new MeleeBot(content, new Vector3(0, 500, 0), Vector3.Zero);
            preloadedMissileBot = new MissileBot(content, new Vector3(0, 500, 0), Vector3.Zero);
            preloadedTokenPickup = new TokenPickup(content, new Vector3(0, 500, 0));
            preloadedMissile = new Missle(content, Vector3.Zero, Vector3.Zero);
            preloadedBotMissile = new BotMissile(content, Vector3.Zero, Vector3.Zero);
            preloadedNeedle = new Needle(content, Vector3.Zero, Vector3.Zero);
            preloadedLaser = new Laser(content, Vector3.Zero, Vector3.Zero);
            preloadedExplosion = new Explosion(0, 0, 0, Vector3.Zero, content, false);
            preloadedChargeBall = new ChargeBall(content, Vector3.Zero);

            clotsDestroyed = false;

            Camera.Instance.setPosition(new Vector3(-7, 7, 7));
        }