Example #1
0
 // XXX need to recieve all the instances: bordMan, playerMan, holeMan etc.
 public GameManager(SpriteFont f, SpriteFont sf, HoleManager h, PlayerManager p, PowerUpManager pu,
     Board bo)
 {
     font = f;
     scoreFont = sf;
     holeManager = h;
     playerManager = p;
     powerupManager = pu;
     board = bo;
     gamestate = GameState.normal;
     folds = 0;
     level = 1;
     endLevel = 1;
 }
        public GameManager(SpriteFont f, SpriteFont sf, HoleManager h, AcidManager a, PlayerManager p, PowerUpManager pu,
            Board bo,Table tab, Texture2D st, Texture2D help, Texture2D ls)
        {
            font = f;
            scoreFont = sf;
            holeManager = h;
            acidManager = a;
            playerManager = p;
            powerupManager = pu;
            board = bo;
            table = tab;
            gamestate = GameState.normal;
            folds = 0;
            level = 0;

            startScreen = st;
            helpScreen = help;
            levelScreen = ls;
            for (int i = 0; i <= endLevel; i++)
            {
            levelsPics.Add(Game1.content.Load<Texture2D>("level" + i));
            levelsPicsBtn.Add(new Rectangle(300 + ((levelsPics.ElementAt(i).Width+30) * ((i<3)? i : i-3)), (i < 3) ? 220 : 400, levelsPics.ElementAt(i).Width, levelsPics.ElementAt(i ).Height));
            }
        }
Example #3
0
 /// <summary>
 /// LoadContent will be called once per game and is the place to load
 /// all of your content.
 /// </summary>
 protected override void LoadContent()
 {
     device = graphics.GraphicsDevice;
     // Create a new SpriteBatch, which can be used to draw textures.
     spriteBatch = new SpriteBatch(GraphicsDevice);
     SpriteFont font = Content.Load<SpriteFont>(@"font");
     SpriteFont scoreFont = Content.Load<SpriteFont>("scoreFont");
     HoleManager holeManager = new HoleManager(Content.Load<Texture2D>("hole2"), Content.Load<Effect>("effects"));
     AcidManager acidManager = new AcidManager(Content.Load<Texture2D>("acid"), Content.Load<Effect>("effects"));
     PlayerManager playerManager = new PlayerManager(Content.Load<Texture2D>("gum"), Content.Load<Effect>("effects"), Content.Load<Texture2D>("dupGum"), Content.Load<Texture2D>("staticGum"));
     PowerUpManager powerupManager = new PowerUpManager(Content.Load<Texture2D>("inkspot"), Content.Load<Effect>("effects"));
     Board board = new Board(Content.Load<Texture2D>("paper"), Content.Load<Effect>("effects"));
     Table table = new Table(Content.Load<Model>("Table"));
     camera = new Camera(this);
     input = new InputHandler(this);
     ourGame = new GameManager(font, scoreFont, holeManager, acidManager, playerManager, powerupManager, board,table, Content.Load<Texture2D>("startScreen"), Content.Load<Texture2D>("help"), Content.Load<Texture2D>("levelsScreen"));
     ourGame.loadCurrLevel();
 }
Example #4
0
 /// <summary>
 /// LoadContent will be called once per game and is the place to load
 /// all of your content.
 /// </summary>
 protected override void LoadContent()
 {
     device = graphics.GraphicsDevice;
     // Create a new SpriteBatch, which can be used to draw textures.
     spriteBatch = new SpriteBatch(GraphicsDevice);
     SpriteFont font = Content.Load<SpriteFont>("font");
     SpriteFont scoreFont = Content.Load<SpriteFont>("scoreFont");
     HoleManager holeManager = new HoleManager(Content.Load<Texture2D>("hole2"), Content.Load<Effect>("effects"));
     PlayerManager playerManager = new PlayerManager(Content.Load<Texture2D>("gummy2"), Content.Load<Effect>("effects"));
     PowerUpManager powerupManager = new PowerUpManager(Content.Load<Texture2D>("inkspot"), Content.Load<Effect>("effects"));
     Board board = new Board(Content.Load<Texture2D>("paper"), Content.Load<Effect>("effects"));
     camera = new Camera(this);
     input = new InputHandler(this);
     ourGame = new GameManager(font, scoreFont, holeManager, playerManager, powerupManager,board);
     ourGame.loadCurrLevel();
 }