Ejemplo 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

                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);
        }
Ejemplo n.º 2
0
 public Image()
 {
     sourceRec = new Rectangle();
     texture = null;
     ImageName = ImageEnum.Not_Initialized;
 }
Ejemplo n.º 3
0
 protected override object privGetNewObj()
 {
     object pObj = new Text();
     return pObj;
 }
Ejemplo n.º 4
0
 public Image(ImageEnum _name, int x, int y, int w, int h, Text text)
 {
     sourceRec = new Rectangle(x, y, w, h);
     texture = text;
     ImageName = _name;
 }