예제 #1
0
        public sGameFour(mouseHelp mouse, keyboardHelp keyboard, GraphicsDevice GraphicsDevice)
            : base(mouse, keyboard, GraphicsDevice)
        {
            this.gameObjects = new List<gameObject>();
            this.obstacleList = new List<Obstacle>();
            this.gameObjects.Add(new gameObject(new Vector2(750, 300), "Texture/Bar"));

            this.gameState = stateGame.game4;

            resetScene();
        }
예제 #2
0
        public sGameOutro(mouseHelp mouse, keyboardHelp keyboard, GraphicsDevice GraphicsDevice)
            : base(mouse, keyboard, GraphicsDevice)
        {
            this.gameObjects = new List<gameObject>();
            this.obstacleList = new List<Obstacle>();
            this.gameObjects.Add(new gameObject(new Vector2(400, 300), "MenuArt/gameOutro"));
            conButt = new objButton(new Vector2(400, 500), "Credits!");
            conButt.zIndex = 0.5f;

            this.gameObjects.Add(conButt);
            this.gameState = stateGame.gameOutro;
        }
        public sGameThreeFail(mouseHelp mouse, keyboardHelp keyboard, GraphicsDevice GraphicsDevice)
            : base(mouse, keyboard, GraphicsDevice)
        {
            this.gameObjects = new List<gameObject>();
            this.obstacleList = new List<Obstacle>();
            this.gameObjects.Add(new gameObject(new Vector2(400, 300), "MenuArt/DrivingTwoFail"));
            conButt = new objButton(new Vector2(400, 500), "Retry");
            conButt.zIndex = 0.5f;

            this.gameObjects.Add(conButt);
            this.gameState = stateGame.game3Fail;
        }
        public sGameOneWin(mouseHelp mouse, keyboardHelp keyboard, GraphicsDevice GraphicsDevice)
            : base(mouse, keyboard, GraphicsDevice)
        {
            this.gameObjects = new List<gameObject>();
            this.obstacleList = new List<Obstacle>();
            this.gameObjects.Add(new gameObject(new Vector2(400, 300), "MenuArt/DrivingOneWin"));
            conButt = new objButton(new Vector2(400, 500), "Continue");
            conButt.zIndex = 0.5f;

            this.gameObjects.Add(conButt);
            this.gameState = stateGame.game1Win;
        }
예제 #5
0
        public sGameThree(mouseHelp mouse, keyboardHelp keyboard, GraphicsDevice GraphicsDevice)
            : base(mouse, keyboard, GraphicsDevice)
        {
            this.gameObjects = new List<gameObject>();
            this.gameObjects.Add(new gameObject(new Vector2(750, 300), "Texture/Bar"));
            this.gameObjects.Add(new gameObject(new Vector2(50, 300), "Texture/Bar"));

            this.gameState = stateGame.game3;

            worldMatrix = Matrix.Identity;

            prepareScene();

            screenFade.A = 0;

            keyState = Keyboard.GetState();
            previousKeyState = keyState;

            bounding = new BoundingBox();

            streetZ = -2000;
            streetZ2 = -6000;
            streetZ3 = -10000;
            camX = 0;
            skyX = 0;
            progress = 0;
            damage = 0;
            drawDamage = 0;

            rotation = 0.0f;

            projMatrix = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(45.0f),
                                                                     GraphicsDevice.DisplayMode.AspectRatio,
                                                                     1.0f,
                                                                     8000.0f);

            timer = new TimeSpan(0, 0, 0);
            obstacleTime = new TimeSpan(0, 0, 1);
            carTime = new TimeSpan(0, 0, 2);

            this.obstacleList = new List<Obstacle>();
        }