示例#1
0
//*****************************************************************************
//*****************************************************************************
//                              Paused
//*****************************************************************************
//*****************************************************************************
        public static void InitializePaused()
        {
            //Load things
            Texture2D bgTex = new Texture2D("/Application/Assets/Paused.png", false);

            backgroundPaused = new BackGround(graphics, bgTex);

            //set state
            currentState = GameState.Paused;
        }
示例#2
0
//*****************************************************************************
//*****************************************************************************
//                            Credits
//*****************************************************************************
//*****************************************************************************
        public static void InitializeCredits()
        {
            //Load things
            Texture2D bgTex = new Texture2D("/Application/Assets/Credits.png", false);

            background = new BackGround(graphics, bgTex);

            //set state
            currentState = GameState.Credits;
        }
示例#3
0
//*****************************************************************************
//*****************************************************************************
//                            Menu
//*****************************************************************************
//*****************************************************************************
        public static void InitializeMenu()
        {
            //Load things
            Texture2D bgTex = new Texture2D("/Application/Assets/Menu.png", false);

            background = new BackGround(graphics, bgTex);
            MusicPlay("/Application/Assets/Menu.mp3");

            //set State
            currentState = GameState.Menu;
        }
示例#4
0
//*****************************************************************************
//*****************************************************************************
//                              HighScore
//*****************************************************************************
//*****************************************************************************
        public static void InitializeHighScore()
        {
            //Load things
            Texture2D bgTex = new Texture2D("/Application/Assets/HighScore.png", false);

            background  = new BackGround(graphics, bgTex);
            topScoreHUD = new TopScoreHUD(graphics, scoreList, 0);
            MusicPlay("/Application/Assets/HighScore.mp3");

            //set state
            currentState = GameState.HighScore;
        }
示例#5
0
//*****************************************************************************
//*****************************************************************************
//                              GameOver
//*****************************************************************************
//*****************************************************************************
        public static void InitializeGameOver()
        {
            //Load things
            Texture2D bgTex = new Texture2D("/Application/Assets/GameOver.png", false);

            background  = new BackGround(graphics, bgTex);
            topScoreHUD = new TopScoreHUD(graphics, scoreList, playership.Points);
            MusicPlay("/Application/Assets/GameOver.mp3");

            //set state
            currentState = GameState.GameOver;
        }
示例#6
0
//*****************************************************************************
//*****************************************************************************
//                            New Game Initialize
//*****************************************************************************
//*****************************************************************************
        private static void InitializeNewGame()
        {
            //Load things
            Texture2D bgTex = new Texture2D("/Application/Assets/Background.png", false);

            background       = new BackGround(graphics, bgTex);
            playership       = new PlayerShip(graphics);
            powerstation     = new PowerStation(graphics);
            enemyList        = new List <Enemy> ();
            weaponPlayerList = new List <Weapon>();
            weaponScaterList = new List <Weapon>();
            projectileList   = new List <Projectile>();
            projectileListE  = new List <Projectile>();
            hud         = new HUD(graphics);
            r           = new Random();
            badguyTimer = 0;

            //LoadingSounds
            MusicPlay("/Application/Assets/MainPlay.mp3");

            //WeaponSounds
            Sound soundEffect;

            soundEffect   = new Sound("/Application/Assets/Bullet.wav");
            bulletSound   = soundEffect.CreatePlayer();
            soundEffect   = new Sound("/Application/Assets/Missle.wav");
            missleSound   = soundEffect.CreatePlayer();
            soundEffect   = new Sound("/Application/Assets/DropBomb.wav");
            dropBombSound = soundEffect.CreatePlayer();

            //enemy creation
            texture = new Texture2D("/Application/Assets/MotherShip.png", false);
            enemyList.Add(new MotherShip(graphics, texture, powerstation, enemyList, 1000, 1, -200, 50));
            CreateSmallBaddys();
            texture = new Texture2D("/Application/Assets/Guardian.png", false);
            enemyList.Add(new Guardian(graphics, texture, playership, enemyList, 250, 2, 0, r.Next(600, 1000)));

            //Weapon Creation
            gunTexFile = "/Application/Assets/gun.png";
            texture    = new Texture2D(gunTexFile, false);
            weaponScaterList.Add(new Guns(graphics, texture, new Vector3(200, 300, 0), 0f, 1));
            missleTexFile = "/Application/Assets/MissleGun.png";
            texture       = new Texture2D(missleTexFile, false);
            weaponScaterList.Add(new Guns(graphics, texture, new Vector3(400, 200, 0), 0f, 2));
            DropOffTexFile = "/Application/Assets/DropBox.png";
            texture        = new Texture2D(DropOffTexFile, false);
            weaponScaterList.Add(new Guns(graphics, texture, new Vector3(600, 100, 0), 0f, 3));

            currentState = GameState.Playing;
        }