예제 #1
0
 public PauseScreen(ScreenManager screenManager)
     : base(screenManager, new String[] { "Continue", "Save", "Save And Exit" },
             new Action[] { MenuItemFunctions.BackToGame, MenuItemFunctions.Save, MenuItemFunctions.MainMenu })
 {
     escPressed = false;
     paused = false;
 }
예제 #2
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (ScreenManager game = new ScreenManager())
     {
         game.Run();
     }
 }
예제 #3
0
 public InputScreen(ScreenManager sm)
     : base(sm, "Input", "", new string[] { "Enter", "Back" }, new Action[] { MenuItemFunctions.ReturnInput, MenuItemFunctions.MainMenu })
 {
     input = "";
     oldPressedKeys = new List<Keys>();
     oldKb = Keyboard.GetState();
     // cursorTime > CURSOR_TIME show, else don't show
     cursorTime = CURSOR_TIME;
 }
예제 #4
0
        public InventoryScreen(ScreenManager sm)
            : base(sm, "Status", "", new string[] { "Back" }, new Action[] { MenuItemFunctions.BackToGame })
        {
            buttonPressed = false;
            itemBlocks = new ItemBlock[] {
                new ItemBlock(0), new ItemBlock(1), new ItemBlock(2), new ItemBlock(3), new ItemBlock(4), new ItemBlock(5),
                new ItemBlock(6), new ItemBlock(7), new ItemBlock(8), new ItemBlock(9), new ItemBlock(10), new ItemBlock(11)
            };

            oldMouse = Mouse.GetState();

            helmRect = new Rectangle(100, 52, 155, 16);
            bodyRect = new Rectangle(100, 76, 155, 16);
            legsRect = new Rectangle(100, 100, 155, 16);
        }
예제 #5
0
        public MenuScreen(ScreenManager sm ,String[] items, Action[] funcs)
            : base(sm)
        {
            menuItems = new List<MenuItem>();
            curSelection = 0;

            // Default
            if (items == null) items = new string[] { "Back" };
            if (funcs == null) funcs = new Action[] { MenuItemFunctions.BackToGame };

            for (int i = 0; i < items.GetLength(0); i++)
                menuItems.Add(new MenuItem(this, items[i], funcs[i], MenuItem.MenuItemAlignment.Center));

            if (menuItems.Count == 0) {
                Console.WriteLine("Tried to make a menu screen with no items!");
                Environment.Exit(1);
            }
        }
예제 #6
0
 public GameScreen(ScreenManager screenManager)
     : base(screenManager)
 {
     offset = new Vector2(0, 0);
     oldKb = Keyboard.GetState();
 }
예제 #7
0
파일: Screen.cs 프로젝트: abenavente406/RPG
 public Screen(ScreenManager screenManager)
 {
     this.screenManager = screenManager;
     DoDraw = DoUpdate = true;
 }
예제 #8
0
 public PopUpScreen(ScreenManager sm, string title, string text = "", string[] items = null, Action[] funcs = null)
     : base(sm, items, funcs)
 {
     Text = text;
     Title = title;
 }
예제 #9
0
 public MainMenuHelpScreen(ScreenManager sm)
     : base(sm, new string[] { "Back" }, new Action[] { MenuItemFunctions.MainMenu })
 {
 }
예제 #10
0
 public MainMenuScreen(ScreenManager screenManager)
     : base(screenManager, new String[] { "Play", "Load", "Help", "Exit" },
             new Action[] { MenuItemFunctions.Play, MenuItemFunctions.Load, MenuItemFunctions.MainMenuHelp, MenuItemFunctions.Exit })
 {
 }