private void EmitExplosion(ref Vector3 pos)
        {
            var     em      = ExplosionParticleSystem.emission;
            var     vel     = ExplosionParticleSystem.velocityOverLifetime;
            var     velX    = vel.x;
            var     velY    = vel.y;
            Vector3 origPos = ExplosionParticleSystem.transform.position;

            origPos.x = pos.x;
            origPos.y = pos.y;
            ExplosionParticleSystem.transform.position = origPos;
            var   m      = ExplosionParticleSystem.main;
            var   c1     = m.startSpeed;
            float c1Orig = c1.curveMultiplier;

            c1.curveMultiplier = cameraMultiplier;
            var   c2     = m.startSize;
            float c2Orig = c2.curveMultiplier;
            var   rate   = em.rateOverTime;

            c2.curveMultiplier = cameraMultiplier;
            velX.constantMin  *= cameraMultiplier;
            velX.constantMax  *= cameraMultiplier;
            velY.constantMin  *= cameraMultiplier;
            velY.constantMax  *= cameraMultiplier;
            ExplosionParticleSystem.Emit(UnityEngine.Random.Range((int)rate.constantMin, (int)rate.constantMax));
            velX.constantMin  /= cameraMultiplier;
            velX.constantMax  /= cameraMultiplier;
            velY.constantMin  /= cameraMultiplier;
            velY.constantMax  /= cameraMultiplier;
            c1.curveMultiplier = c1Orig;
            c2.curveMultiplier = c2Orig;
        }
Exemple #2
0
        public void AddExplosion(Vector2 position)
        {
            ExplosionParticleSystem explosion = new ExplosionParticleSystem(Game, 1);

            explosion.AddParticles(position);
            explosions.Add(explosion);
        }
Exemple #3
0
    private void Start()
    {
        ınput = new InputManager();

        game = new GameHandler(GameHandler.GameState.BeginingPage);

        platformSizeHandler = new PlatformSizeHandler();

        uI = (UIHandler)FindObjectOfType(typeof(UIHandler));

        explosionParticleSystem = (ExplosionParticleSystem)FindObjectOfType(typeof(ExplosionParticleSystem));

        block  = GameObject.FindWithTag("Block");
        runner = GameObject.FindWithTag("Runner");
        lines  = GameObject.FindWithTag("Lines");
        road   = GameObject.FindWithTag("Road");
        //background = GameObject.FindWithTag("Background");

        distBetweenBlock = platformSizeHandler.ArrangeSize(road.transform, lines.transform, block.transform, runner.transform);

        lines.transform.position = new Vector2(0f, runner.transform.position.y + (5 * distBetweenBlock));
        road.transform.position  = new Vector2(0f, runner.transform.position.y + (5 * distBetweenBlock));
        //background.transform.position = new Vector2(0f, runner.transform.position.y + 5);

        platfotmTiles = new List <GameObject>();
        platfotmTiles.Add(block);

        BlockPos = new float[] { -distBetweenBlock, distBetweenBlock };
        distance = -5f;                 // Start from -5

        int levelStartStraightLine = 7; // start from third block to give full road

        platfotmTiles[platfotmTiles.Count - 1].transform.position = new Vector2(0f, distance);


        for (int i = 0; i < levelStartStraightLine; i++)
        {
            distance += distBetweenBlock;
            platfotmTiles.Add((GameObject)Instantiate(block, this.transform));
            platfotmTiles[platfotmTiles.Count - 1].transform.position = new Vector2(0f, distance);
        }

        blockNum = 10;

        for (int i = 0; i < blockNum; i++)
        {
            platfotmTiles.Add((GameObject)Instantiate(block, this.transform));
            platfotmTiles[platfotmTiles.Count - 1].transform.position = BlockPositioner(distBetweenBlock);
        }
        blockToSlide     = 0;
        pushBlockForward = 0;

        point = 0;
    }
Exemple #4
0
        public Game1()
        {
            Graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            Explosion = new ExplosionParticleSystem(this, 1, "sprites/explosion");
            Components.Add(Explosion);

            Smoke = new ExplosionSmokeParticleSystem(this, 2, "sprites/smoke");
            Components.Add(Smoke);
        }
Exemple #5
0
        public override void Activate()
        {
            if (content == null)
            {
                content = new ContentManager(ScreenManager.Game.Services, "Content");
            }

            asteroids = new Asteroid[]
            {
                new Asteroid(new Vector2((float)random.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Width, (float)random.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Height), new Vector2((float)random.NextDouble(), (float)random.NextDouble()), ScreenManager.GraphicsDevice),
                new Asteroid(new Vector2((float)random.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Width, (float)random.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Height), new Vector2((float)random.NextDouble(), (float)random.NextDouble()), ScreenManager.GraphicsDevice),
                new Asteroid(new Vector2((float)random.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Width, (float)random.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Height), new Vector2((float)random.NextDouble(), (float)random.NextDouble()), ScreenManager.GraphicsDevice),
            };
            coins = new Coin[]
            {
                new Coin(new Vector2((float)random.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Width, (float)random.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Height)),
                new Coin(new Vector2((float)random.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Width, (float)random.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Height)),
                new Coin(new Vector2((float)random.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Width, (float)random.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Height)),
                new Coin(new Vector2((float)random.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Width, (float)random.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Height)),
                new Coin(new Vector2((float)random.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Width, (float)random.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Height)),
                new Coin(new Vector2((float)random.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Width, (float)random.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Height)),
                new Coin(new Vector2((float)random.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Width, (float)random.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Height))
            };

            coinsLeft = coins.Length;

            spaceShip.LoadContent(content);
            foreach (var asteroid in asteroids)
            {
                asteroid.LoadContent(content);
            }
            foreach (var coin in coins)
            {
                coin.LoadContent(content);
            }

            bangers        = content.Load <SpriteFont>("bangers");
            coinPickup     = content.Load <SoundEffect>("Pickup_Coin15");
            starBackground = content.Load <Texture2D>("star-background");

            shootingStar = new ShootingStarParticleSystem(ScreenManager.Game, new Rectangle(0, -20, 800, 10));
            ScreenManager.Game.Components.Add(shootingStar);

            explosion = new ExplosionParticleSystem(ScreenManager.Game, 20);
            ScreenManager.Game.Components.Add(explosion);

            pickup = new CoinPickupParticleSystem(ScreenManager.Game, 20);
            ScreenManager.Game.Components.Add(pickup);

            Thread.Sleep(1000);

            ScreenManager.Game.ResetElapsedTime();
        }
        // Load graphics content for the game
        public override void Activate()
        {
            if (_content == null)
            {
                _content = new ContentManager(ScreenManager.Game.Services, "Content");
            }

            _gameFont    = _content.Load <SpriteFont>("gamefont");
            _spriteBatch = new SpriteBatch(ScreenManager.GraphicsDevice);

            batSprite  = new BatSprite();
            exitSprite = new ExitSprite();

            background = _content.Load <Texture2D>("dark-cave");

            explosion = new ExplosionParticleSystem(ScreenManager.Game, 20);
            ScreenManager.Game.Components.Add(explosion);
            SoundEffect.MasterVolume = 0.5f;

            firework = new FireworkParticleSystem(ScreenManager.Game, 20);
            ScreenManager.Game.Components.Add(firework);
            //Creates initial coins.
            System.Random rand = new System.Random();
            coins = new CoinSprite[]
            {
                new CoinSprite(new Vector2((float)rand.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Width, (float)rand.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Height)),
                new CoinSprite(new Vector2((float)rand.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Width, (float)rand.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Height)),
                new CoinSprite(new Vector2((float)rand.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Width, (float)rand.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Height)),
                new CoinSprite(new Vector2((float)rand.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Width, (float)rand.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Height)),
                new CoinSprite(new Vector2((float)rand.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Width, (float)rand.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Height)),
                new CoinSprite(new Vector2((float)rand.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Width, (float)rand.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Height)),
                new CoinSprite(new Vector2((float)rand.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Width, (float)rand.NextDouble() * ScreenManager.GraphicsDevice.Viewport.Height))
            };

            foreach (var coin in coins)
            {
                coin.LoadContent(_content);
            }
            batSprite.LoadContent(_content);
            bangers = _content.Load <SpriteFont>("bangers");
            exitSprite.LoadContent(_content);
            coinPickup              = _content.Load <SoundEffect>("Pickup_Coin14");
            backgroundMusic         = _content.Load <Song>("Bio Unit - Docking");
            MediaPlayer.IsRepeating = true;
            MediaPlayer.Play(backgroundMusic);

            // once the load has finished, we use ResetElapsedTime to tell the game's
            // timing mechanism that we have just finished a very long frame, and that
            // it should not try to catch up.
            ScreenManager.Game.ResetElapsedTime();
        }
 public void Initialize()
 {
     _projectilePool       = new Projectile[WorldSettings.MAXPROJECTILES];
     _activeProjectiles    = new bool[WorldSettings.MAXPROJECTILES];
     _availableProjectiles = new Queue <int>(WorldSettings.MAXPROJECTILES);
     _projectileVertexList = new List <VertexPositionColor>(WorldSettings.MAXPROJECTILES * 6);
     //_vertexDeclaration = new VertexDeclaration(_game.GraphicsDevice, VertexPositionColor.VertexElements);
     _bazookaSmokeParticleSystem = new BazookaSmokeParticleSystem(_game, _game.Content);
     _bazookaSmokeParticleSystem.Initialize();
     _explosionParticleSystem = new ExplosionParticleSystem(_game, _game.Content);
     _explosionParticleSystem.Initialize();
     _explosionSmokeParticleSystem = new ExplosionSmokeParticleSystem(_game, _game.Content);
     _explosionSmokeParticleSystem.Initialize();
     Clear();
 }
        public void StartGame()
        {
            _starField       = new StarField(StarCount, _starVelocity, new TileSheet(_spriteSheet, _starTextureSourceRectangle, Star.AnimationFrames), ScreenBounds);
            _asteroidManager = new AsteroidManager(AsteroidCount, new TileSheet(_spriteSheet, _initalAsteroidFrame, Asteroid.AsteroidFrames), ScreenBounds);
            _shotManager     = new ShotManager(new TileSheet(_spriteSheet, _shotTextureInitialFrame, Shot.AnimationFrames), ScreenBounds);
            _enemyManager    = new EnemyManager(new TileSheet(_spriteSheet, _enemyInitialFrame, Enemy.AnimationFrames), ScreenBounds);

            _pieceExplosionManager = new ExplosionParticleSystem(new TileSheet(_spriteSheet, _explosionPieceSpriteFrame, ExplosionParticleSystem.PieceAnimationFrames), ExplosionParticleSystem.ParticleType.Piece);
            _pointExplosionManager = new ExplosionParticleSystem(new TileSheet(_spriteSheet, _explosionPointSpriteFrame, ExplosionParticleSystem.PointAnimationFrames), ExplosionParticleSystem.ParticleType.Point);

            _asteroidManager.OnAsteroidDestroy += (s, e) => _collisionEngine.RemoveEntity((GameEntity)s);
            _shotManager.OnShotDestroy         += (s, e) => _collisionEngine.RemoveEntity((GameEntity)s);
            _enemyManager.OnEnemyDestroyed     += HandleOnEnemyDestroy;
            _enemyManager.ShotFired            += EnemyManagerShotFired;

            SpawnPlayer();
            _playerScore = 0;
            _gameOver    = false;
        }
        protected override void LoadContent(GraphicInfo GraphicInfo, GraphicFactory factory, IContentManager contentManager)
        {
            base.LoadContent(GraphicInfo, factory, contentManager);

            ExplosionParticleSystem exp = new ExplosionParticleSystem();
            DPFSParticleSystem      ps  = new DPFSParticleSystem("exp", exp);

            this.World.ParticleManager.AddAndInitializeParticleSystem(ps);

            //SimpleModel simpleModel = new SimpleModel(factory, "Model//cenario");
            //TriangleMeshObject tmesh = new TriangleMeshObject(simpleModel, Vector3.Zero, Matrix.Identity, Vector3.One, MaterialDescription.DefaultBepuMaterial());
            //DeferredNormalShader shader = new DeferredNormalShader();
            //DeferredMaterial fmaterial = new DeferredMaterial(shader);
            //IObject obj = new IObject(fmaterial, simpleModel, tmesh);
            //this.World.AddObject(obj);

            #region NormalLight
            DirectionalLightPE ld1 = new DirectionalLightPE(Vector3.Left, Color.White);
            DirectionalLightPE ld2 = new DirectionalLightPE(Vector3.Right, Color.White);
            DirectionalLightPE ld3 = new DirectionalLightPE(Vector3.Backward, Color.White);
            DirectionalLightPE ld4 = new DirectionalLightPE(Vector3.Forward, Color.White);
            DirectionalLightPE ld5 = new DirectionalLightPE(Vector3.Down, Color.White);
            float li = 0.5f;
            ld1.LightIntensity = li;
            ld2.LightIntensity = li;
            ld3.LightIntensity = li;
            ld4.LightIntensity = li;
            ld5.LightIntensity = li;
            this.World.AddLight(ld1);
            this.World.AddLight(ld2);
            this.World.AddLight(ld3);
            this.World.AddLight(ld4);
            this.World.AddLight(ld5);
            #endregion

            this.World.CameraManager.AddCamera(new CameraFirstPerson(GraphicInfo));

            //SkyBoxSetTextureCube stc = new SkyBoxSetTextureCube("Textures//cubemap");
            //CommandProcessor.getCommandProcessor().SendCommandAssyncronous(stc);

            //this.RenderTechnic.AddPostEffect(new AntiAliasingPostEffectTabula());
            this.RenderTechnic.AddPostEffect(new AntiAliasingPostEffectStalker());
        }
Exemple #10
0
        public AlienShooterGame()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";
            TargetElapsedTime     = TimeSpan.FromTicks(333333);

            // you can choose whether you want a landscape or portrait
            // game by using one of the two helper functions defined below
            InitializePortraitGraphics();
            // InitializeLandscapeGraphics();

            // Create the screen manager component.
            screenManager = new ScreenManager(this);
            Components.Add(screenManager);

            //Add Explosions and Smoke Game Components to AlienShooter
            explosionSmokeParticleSystem = new ExplosionSmokeParticleSystem(this, 2);
            Components.Add(explosionSmokeParticleSystem);
            explosionParticleSystem = new ExplosionParticleSystem(this, 1);
            Components.Add(explosionParticleSystem);
            smokePlumeParticleSystem = new SmokePlumeParticleSystem(this, 8);
            Components.Add(smokePlumeParticleSystem);

            // attempt to deserialize the screen manager from disk. if that
            // fails, we add our default screens.
            if (!screenManager.DeserializeState())
            {
                // Activate the first screens.
                screenManager.AddScreen(new BackgroundScreen(), null);
                screenManager.AddScreen(new MainMenuScreen(), null);
            }
            //Imeplement tombstoning support globally if managing
            //multiple state objects across game gamescreens
            PhoneApplicationService.Current.Activated   += AlienGame_Activated;
            PhoneApplicationService.Current.Deactivated += AlienGame_Deactivated;
        }
Exemple #11
0
        public override void Activate()
        {
            if (_content == null)
            {
                _content = _content = new ContentManager(ScreenManager.Game.Services, "Content");
            }

            font            = _content.Load <SpriteFont>("GoudyStout");
            high_score_font = _content.Load <SpriteFont>("Score");

            disc          = new Disc();
            disc.Position = new Vector2(1800, 5);
            basket        = new DiscBasket(new Vector2(940 - 700, 480 + 250));

            //Generate random wind for the start
            windAngle     = (float)(rand.NextDouble() * 2 * Math.PI);
            windDirection = new Vector2((float)Math.Cos(windAngle), (float)Math.Sin(windAngle));

            bushes = new Bush[]
            {
                new Bush(new Vector2(100, 550), GameProject1.Direction.Down, true),
                new Bush(new Vector2(100, 550), GameProject1.Direction.Right, false),
                new Bush(new Vector2(700, 950), GameProject1.Direction.Up, true),
                new Bush(new Vector2(700, 950), GameProject1.Direction.Left, false),
                new Bush(new Vector2(1600, 300), GameProject1.Direction.Down, true),
                new Bush(new Vector2(1400, 400), GameProject1.Direction.Right, false),
                new Bush(new Vector2(450, 400), GameProject1.Direction.Right, false),
                new Bush(new Vector2(960, 600), GameProject1.Direction.Up, true),
                new Bush(new Vector2(1100, 300), GameProject1.Direction.Down, true),
                new Bush(new Vector2(320, 1040), GameProject1.Direction.Up, true)
            };
            trees = new Tree[]
            {
                new Tree(RandomHelper.RandomPosition(new Rectangle(0, 0, 1920, 1080)), TreeType.pink_tree),
                new Tree(RandomHelper.RandomPosition(new Rectangle(0, 0, 1920, 1080)), TreeType.tall_green_tree),
                new Tree(RandomHelper.RandomPosition(new Rectangle(0, 0, 1920, 1080)), TreeType.tall_green_tree),
                new Tree(RandomHelper.RandomPosition(new Rectangle(0, 0, 1920, 1080)), TreeType.stump),
                new Tree(RandomHelper.RandomPosition(new Rectangle(0, 0, 1920, 1080)), TreeType.stump),
                new Tree(RandomHelper.RandomPosition(new Rectangle(0, 0, 1920, 1080)), TreeType.normal_green_tree),
                new Tree(RandomHelper.RandomPosition(new Rectangle(0, 0, 1920, 1080)), TreeType.normal_green_tree),
                new Tree(RandomHelper.RandomPosition(new Rectangle(0, 0, 1920, 1080)), TreeType.pink_tree),
                new Tree(RandomHelper.RandomPosition(new Rectangle(0, 0, 1920, 1080)), TreeType.pink_tree),
                new Tree(RandomHelper.RandomPosition(new Rectangle(0, 0, 1920, 1080)), TreeType.pink_tree),
                new Tree(RandomHelper.RandomPosition(new Rectangle(0, 0, 1920, 1080)), TreeType.normal_brown_tree),
                new Tree(RandomHelper.RandomPosition(new Rectangle(0, 0, 1920, 1080)), TreeType.normal_brown_tree),
                new Tree(RandomHelper.RandomPosition(new Rectangle(0, 0, 1920, 1080)), TreeType.stump),
                new Tree(RandomHelper.RandomPosition(new Rectangle(0, 0, 1920, 1080)), TreeType.dead_tree),
                new Tree(RandomHelper.RandomPosition(new Rectangle(0, 0, 1920, 1080)), TreeType.dead_tree),
                new Tree(RandomHelper.RandomPosition(new Rectangle(0, 0, 1920, 1080)), TreeType.normal_green_tree)
            };
            basket.LoadContent(_content);
            windArrow = _content.Load <Texture2D>("windArrow");
            foreach (Bush bush in bushes)
            {
                bush.LoadContent(_content);
            }
            foreach (Tree tree in trees)
            {
                tree.LoadContent(_content);
            }
            disc.LoadContent(_content);
            font            = _content.Load <SpriteFont>("GoudyStout");
            high_score_font = _content.Load <SpriteFont>("Score");

            //Particle engine stuff
            Rectangle source = windAngle < Math.PI ? new Rectangle(-960, -20, 1920 * 2, 10) : new Rectangle(-960, 1100, 1920 * 2, 10);

            windParticleSystem = new WindParticleSystem(ScreenManager.Game, source, windDirection);
            ScreenManager.Game.Components.Add(windParticleSystem);

            Color[] fireworkColors = new Color[]
            {
                Color.Fuchsia,
                Color.Red,
                Color.Crimson,
                Color.CadetBlue,
                Color.Aqua,
                Color.HotPink,
                Color.LimeGreen
            };

            Color[] bushHitColors = new Color[]
            {
                Color.Brown,
                Color.DarkGreen,
                Color.Tan,
                Color.SandyBrown,
                Color.DarkRed,
                Color.LightGreen
            };
            basketParticleSystem = new ExplosionParticleSystem(ScreenManager.Game, 20, fireworkColors, true);
            ScreenManager.Game.Components.Add(basketParticleSystem);

            bushParticleSystem = new ExplosionParticleSystem(ScreenManager.Game, 20, bushHitColors, false);
            ScreenManager.Game.Components.Add(bushParticleSystem);

            //Music/Sound effects
            sfxBushHit              = _content.Load <SoundEffect>("bush_hit");
            sfxChains               = _content.Load <SoundEffect>("DG-Putt");
            backgroundMusic         = _content.Load <Song>("background_music");
            MediaPlayer.IsRepeating = true;
            MediaPlayer.Play(backgroundMusic);
            base.Activate();
        }
Exemple #12
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        public override void LoadContent()
        {
            if (content == null)
            {
                content = new ContentManager(ScreenManager.Game.Services, "Content");
            }

            if (components == null)
            {
                components = ScreenManager.Game.Components;
            }

            if (graphics == null)
            {
                graphics = ScreenManager.GraphicsDevice;
            }

            // create the particle systems and add them to the components list.
            // we should never see more than one explosion at once
            explosion = new ExplosionParticleSystem(this, 1);
            components.Add(explosion);

            // but the smoke from the explosion lingers a while.
            smoke = new ExplosionSmokeParticleSystem(this, 2);
            components.Add(smoke);

            bloodSprayUp       = new RetroBloodSprayWide(this, 100);
            bloodSprayRight    = new RetroBloodSprayParticleSystem(this, 10);
            bloodSprayLeft     = new RetroBloodSprayParticleSystem(this, 10);
            bloodSprayLeft.Dir = -1.0f;
            components.Add(bloodSprayUp);
            components.Add(bloodSprayRight);
            components.Add(bloodSprayLeft);

            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(ScreenManager.Game.GraphicsDevice);

            // Load fonts
            hudFont = content.Load <SpriteFont>("Fonts/Hud");

            // Load overlay textures
            winOverlay  = content.Load <Texture2D>("Overlays/you_win");
            loseOverlay = content.Load <Texture2D>("Overlays/you_lose");
            diedOverlay = content.Load <Texture2D>("Overlays/you_died");
            arrow       = content.Load <Texture2D>("Sprites/arrow");

            // Load sounds
            firstBloodSound   = content.Load <SoundEffect>("Sounds/UT/firstblood");
            dominatingSound   = content.Load <SoundEffect>("Sounds/UT/dominating");
            doublekillSound   = content.Load <SoundEffect>("Sounds/UT/doublekill");
            godlikeSound      = content.Load <SoundEffect>("Sounds/UT/godlike");
            holyshitSound     = content.Load <SoundEffect>("Sounds/UT/holyshit");
            killingspreeSound = content.Load <SoundEffect>("Sounds/UT/killingspree");
            megakillSound     = content.Load <SoundEffect>("Sounds/UT/megakill");
            monsterKillSound  = content.Load <SoundEffect>("Sounds/UT/monsterkill");
            multikillSound    = content.Load <SoundEffect>("Sounds/UT/multikill");
            ultrakillSound    = content.Load <SoundEffect>("Sounds/UT/ultrakill");
            unstoppableSound  = content.Load <SoundEffect>("Sounds/UT/unstoppable");
            wickedsickSound   = content.Load <SoundEffect>("Sounds/UT/wickedsick");
            failSound         = content.Load <SoundEffect>("Sounds/smb_gameover");

            //Known issue that you get exceptions if you use Media PLayer while connected to your PC
            //See http://social.msdn.microsoft.com/Forums/en/windowsphone7series/thread/c8a243d2-d360-46b1-96bd-62b1ef268c66
            //Which means its impossible to test this from VS.
            //So we have to catch the exception and throw it away
            try
            {
                MediaPlayer.IsRepeating = true;
                MediaPlayer.Play(content.Load <Song>("Sounds/Music/bgmusic1"));
            }
            catch { }

            //Create the players
            //Player 1
            players.Add(new Player(this, Vector2.Zero, 0));
            players.Add(new Player(this, Vector2.Zero, 1));

            // Set player 2's colors
            players[1].LoadContent("Sprites/Player/cop_yellow_idle",
                                   "Sprites/Player/cop_yellow_running",
                                   "Sprites/Player/cop_yellow_jump",
                                   "Sprites/Player/cop_yellow_die",
                                   "Sprites/Player/cop_yellow_roll",
                                   "Sprites/Player/cop_yellow_grenade");
            players[1].Flip = SpriteEffects.FlipHorizontally;

            LoadNextLevel();
        }