Exemplo n.º 1
0
        public Game()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            this.graphics.IsFullScreen = true;

            this.graphics.PreferredBackBufferWidth = 800;
            this.graphics.PreferredBackBufferHeight = 600;

            camera = new Camera(new Rectangle(0,0, 800, 600));
        }
Exemplo n.º 2
0
        public Boxing_Manager(ContentManager content, Rectangle ClientBounds, Input_Handler[] inputs,
            GraphicsDevice gd, Camera camera)
        {
            this.graphicsDevice = gd;
            this.camera = camera;

            //camera = new Camera(ClientBounds);

            this.bounds = new Rectangle(0, 0, ClientBounds.Width, ClientBounds.Height);
            this.inputs = inputs;

            background = content.Load<Texture2D>("Boxing/AB Background");
            font = content.Load<SpriteFont>("Menu/menufont");
            blank = content.Load<Texture2D>("White");

            #region Add StateNames
            StateNames.Add(smoving);
            StateNames.Add(sstopped);
            StateNames.Add(sjump);
            StateNames.Add(sattack1);
            StateNames.Add(sattack3);
            StateNames.Add(scasting);
            StateNames.Add(shit);
            StateNames.Add(sdead);
            #endregion

            #region ItemNames
            ItemNames.Add(cane);

            #endregion

            state = boxingstate.idle;

            level = new Level(this, ClientBounds, blank, background);

            for (int i = 0; i < 4; i++)
                playerStartPositions[i] = new Vector2(bounds.X + bounds.Width / 5 * (i + 1), level.platforms[level.platforms.Length - 1].Y);

            //level.platforms[level.platforms.Length - 1].Y = (int)playerStartPositions[0].Y;

            NumRounds = 1;
            itemInstances = new List<ItemInstance>();

            healthBarDimensions = new Rectangle(0, 0, ClientBounds.Width / 16, ClientBounds.Height / 80);

            LoadContent(content);
        }