Exemplo n.º 1
0
        public QuantityDisplayBar(Vector2 DIMS, int BOARDER, Color COLOR)
        {
            boarder = BOARDER;
            color   = COLOR;

            bar    = new Basic2D("2D\\Misc\\bar", new Vector2(0, 0), new Vector2(DIMS.X - boarder * 2, DIMS.Y - boarder * 2));
            barBKG = new Basic2D("2D\\Misc\\barBkg", new Vector2(0, 0), new Vector2(DIMS.X, DIMS.Y));
        }
Exemplo n.º 2
0
        public WorldMap(PassObject CHANGEGAMESTATE)
        {
            ChangeGameState = CHANGEGAMESTATE;

            bkg = new Basic2D("2D\\UI\\Backgrounds\\WordMapBackground", new Vector2(Globals.screenWidth / 2, Globals.screenHeight / 2), new Vector2(Globals.screenWidth, Globals.screenHeight));


            LoadData();
        }
Exemplo n.º 3
0
        public UI(PassObject RESET)
        {
            pauseOverlay = new Basic2D("2D\\Misc\\pause_icon", new Vector2(Globals.screenWidth / 2, Globals.screenHeight / 2), new Vector2(200, 200));

            font = Globals.content.Load <SpriteFont>("Fonts\\Arial16");

            resetBtn = new Button2d("2D\\Misc\\button1", new Vector2(0, 0), new Vector2(96, 32), "Fonts\\Arial16", "Reset", RESET, null);

            healthBar = new QuantityDisplayBar(new Vector2(104, 16), 2, Color.Red);
        }
Exemplo n.º 4
0
 public SquareGrid(Vector2 SLOTDIMS, Vector2 STARTPOS, Vector2 TOTALDIMS, XElement DATA)
 {
     showGrid          = false;
     slotDims          = SLOTDIMS;
     physicalStartPos  = new Vector2((int)STARTPOS.X, (int)STARTPOS.Y);
     totalPhysicalDims = new Vector2((int)(TOTALDIMS.X), (int)(TOTALDIMS.Y));
     currentHoverSlot  = new Vector2(0, 0);
     SetBaseGrid(null);
     gridImg = new Basic2D("2d\\Misc\\barBkg", slotDims / 2, new Vector2(slotDims.X - 2, slotDims.Y - 2));
     LoadData(DATA);
 }
Exemplo n.º 5
0
        public MainMenu(PassObject PLAYCLICKDEL, PassObject EXITCLICKDEL, PassObject CHANGEGAMESTATE)
        {
            PlayClickDel    = PLAYCLICKDEL;
            ExitClickDel    = EXITCLICKDEL;
            ChangeGameState = CHANGEGAMESTATE;

            bkg = new Basic2D("2D\\UI\\Backgrounds\\MenuBackground", new Vector2(Globals.screenWidth / 2, Globals.screenHeight / 2), new Vector2(Globals.screenWidth, Globals.screenHeight));

            buttons.Add(new Button2d("2D\\Misc\\button", new Vector2(0, 0), new Vector2(126, 42), "Fonts\\Arial16", "Play", PlayClickDel, 1));

            buttons.Add(new Button2d("2D\\Misc\\button", new Vector2(0, 0), new Vector2(126, 42), "Fonts\\Arial16", "Exit", ExitClickDel, null));
        }
Exemplo n.º 6
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            Globals.content     = this.Content;
            Globals.spriteBatch = new SpriteBatch(GraphicsDevice);

            // TODO: use this.Content to load your game content here
            cursor = new Basic2D("2D\\Misc\\Cursor1", new Vector2(0, 0), new Vector2(18, 18));

            Globals.normalEffect = Globals.content.Load <Effect>("Effects\\Normal");


            Globals.keyboard = new McKeyboard();
            Globals.mouse    = new McMouseControl();

            mainMenu = new MainMenu(ChangeGameState, ExitGame, ChangeGameState);
            gamePlay = new GamePlay(ChangeGameState);
            worldMap = new WorldMap(ChangeGameState);



            Globals.soundControl = new SoundControl("Audio\\Muzyka");
        }