Esempio n. 1
0
        public World(
            ChaseCameraGame main,
            Loader l,
            LevelContentManager lcm,
            CollisionManager cm,
            PowerUpManager pum,
            BackgroundManager bgm,
            ProjectileManager pm,
            EnemyProjectileManager epm,
            EnemyManager em,
            ScoreManager sm,
            Camera cam) : base(main)
        {
            //Store the refernce to variables
            loader = l;
            levelContentManager    = lcm;
            collisionManager       = cm;
            powerUpManager         = pum;
            backgroundManager      = bgm;
            enemyProjectileManager = epm;
            projectileManager      = pm;
            enemyManager           = em;
            scoreManager           = sm;
            camera = cam;

            //Add mangers to a list for iteration
            managers.Add(collisionManager);
            managers.Add(enemyManager);
            managers.Add(enemyProjectileManager);
            managers.Add(projectileManager);
            managers.Add(backgroundManager);
            managers.Add(powerUpManager);

            //Initialise Player
            AddNewPlayer();

            //Set references for managers
            powerUpManager.SetWorld(this);
            powerUpManager.SetCollisionManager(this.collisionManager);

            projectileManager.SetWorld(this);
            projectileManager.SetCollisionManager(this.collisionManager);

            enemyManager.SetWorld(this);
            enemyManager.SetCollisionManager(this.collisionManager);
            enemyManager.SetScoreManager(scoreManager);
            enemyManager.SetProjectileManager(this.enemyProjectileManager);

            backgroundManager.SetCamera(camera);

            scoreManager.SetPlayer(player);

            powerUpManager.SetScoreManager(scoreManager);

            //Name of this scene
            name = "Level";
        }
Esempio n. 2
0
        public WidgetManager(GraphicsDevice graphicDevice, MenuContentManager menuContent, LevelContentManager levelContent, EndScreenContentManager endScreenContent)
        {
            this.graphicDevice    = graphicDevice;
            this.menuContent      = menuContent;
            this.levelContent     = levelContent;
            this.endScreenContent = endScreenContent;

            SCREEN_HEIGHT = graphicDevice.Viewport.Height;
            SCREEN_WIDTH  = graphicDevice.Viewport.Width;
        }
Esempio n. 3
0
        //Manager for menus

        #endregion

        #region Initialization
        public ChaseCameraGame()
        {
            //set up window
            graphics = new GraphicsDeviceManager(this);
            graphics.SupportedOrientations     = DisplayOrientation.Portrait;
            graphics.PreferredBackBufferWidth  = 1920;
            graphics.PreferredBackBufferHeight = 1080;

            //get root directory
            Content.RootDirectory = "Content";

            //Set up content managers
            menuContents      = new MenuContentManager(this);
            levelContents     = new LevelContentManager(this);
            endScreenContents = new EndScreenContentManager(this);

            //IsMouseVisible = true;
        }
Esempio n. 4
0
 public void SetSoundEffect(LevelContentManager lcm)
 {
     this.fire = lcm.Fire;
 }
Esempio n. 5
0
 public void SetSoundEffect(LevelContentManager lcm)
 {
     scoreSoundEffect = lcm.Score;
 }
Esempio n. 6
0
 public void SetOldPlane(LevelContentManager lcm)
 {
     oldPlaneModel    = lcm.OldPlaneModel;
     oldPlaneTextures = lcm.OldPlaneTextures;
 }
Esempio n. 7
0
 public void SetHelicopter(LevelContentManager lcm)
 {
     helicopterModel   = lcm.HelicopterModel;
     helicpterTextures = lcm.HelicopterTextures;
 }
Esempio n. 8
0
 public void SetSoundEffect(LevelContentManager lcm)
 {
     this.explosion = lcm.Explosion;
 }
 public void SetSoundEffect(LevelContentManager lcm)
 {
     fireSoundEffect = lcm.Fire;
 }
Esempio n. 10
0
 public void SetPowerUp(LevelContentManager lcm)
 {
     model    = lcm.PowerUpModel;
     textures = lcm.PowerUpTextures;
 }