Exemplo n.º 1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // TODO: use this.Content to load your game content here
            spriteBatch = new SpriteBatch(GraphicsDevice);
            font        = Content.Load <SpriteFont>("SpriteFont1");

            world = new World(new Vector2(0, 0), true);
            myContactListener myContactListener = new myContactListener();

            world.ContactListener = myContactListener;
            Data.Instance().createData();
            backgroundTexture = Content.Load <Texture2D>("background");
            //backgroundTexture = Content.Load<Texture2D>("MainmenuLobby");
            player1 = PlayerManager.getPlayer(PlayerID.one);
            player2 = PlayerManager.getPlayer(PlayerID.two);
        }
Exemplo n.º 2
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // TODO: use this.Content to load your game content here

            world = new World(new Vector2(0, 0), true);

            myContactListener myContactListener = new myContactListener();

            world.ContactListener = myContactListener;


            Data.Instance().createData();

            state = gameState.game;

            player1 = PlayerManager.Instance().getPlayer(PlayerID.one);
            player2 = PlayerManager.Instance().getPlayer(PlayerID.two);

            spriteBatch = new SpriteBatch(GraphicsDevice);

            // font = Content.Load<SpriteFont>("Font");
            font = Content.Load <SpriteFont>("SpriteFont1");
        }
Exemplo n.º 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()
        {
            // TODO: use this.Content to load your game content here

                world = new World(new Vector2(0, 0), true);

                myContactListener myContactListener = new myContactListener();

                world.ContactListener = myContactListener;

                Data.Instance().createData();

            if(state != gameState.winner)
                state = gameState.mainmenu;

                player1 = PlayerManager.Instance().getPlayer(PlayerID.one);
                player2 = PlayerManager.Instance().getPlayer(PlayerID.two);

                menuTex = new Text("MainMenu", TextEnum.menu, 0, 20, 20, false, SpriteAnimation.Type.Text_Sprite);
                menuImg = new Image(ImageEnum.menu, 0, 0, 800, 480, menuTex);
                menuSprite = new Sprite(SpriteEnum.menu, 0, 0, 800, 500, false, 0, menuImg, false);
                menuProxy = new Sprite_Proxy(menuSprite, 400, 240, 1, Color.White);
                menuBatch = new SpriteBatch(GraphicsDevice);
        }