Esempio n. 1
0
        public GameLobby(Game1 g, MenuManager mm)
            : base(g, mm)
        {
            // pos is proportional to screen size (IE, SCREENWIDTH / 20 * pos)
            AddFlavorItem("Class Type", new Vector2(1, 11));
            AddFlavorItem("_________", new Vector2(1, 12));
            AddMenuItem("Mapmaker", new Vector2(1, 13), 0,
                delegate() { classType = "mapmaker"; SendClass(); ActivateItem(0, 0); });
            AddMenuItem("Ninja", new Vector2(1, 14), 0,
                delegate() { classType = "ninja"; SendClass(); ActivateItem(1, 0); });
            AddMenuItem("Powdermonkey", new Vector2(1, 15), 0,
                delegate() { classType = "powdermonkey"; SendClass(); ActivateItem(2, 0); });
            AddMenuItem("Capitalist", new Vector2(1, 16), 0,
                delegate() { classType = "capitalist"; SendClass(); ActivateItem(3, 0); });
            AddMenuItem("Apothecary", new Vector2(1, 17), 0,
                delegate() { classType = "apothecary"; SendClass(); ActivateItem(4, 0); });
            AddMenuItem("Mystic", new Vector2(1, 18), 0,
               delegate() { classType = "mystic"; SendClass(); ActivateItem(5, 0); });

            AddFlavorItem("Team", new Vector2(7, 11));
            AddFlavorItem("_________", new Vector2(7, 12));
            AddMenuItem("Blue", new Vector2(7, 13), 1,
                delegate() { team = 0; SendTeam(); ActivateItem(0, 1); });
            AddMenuItem("Red", new Vector2(7, 14), 1,
                delegate() { team = 1; SendTeam(); ActivateItem(1, 1); });

            AddMenuItem("OK", new Vector2(15, 12), 2,
               delegate() { SendReady();  });

            AddFlavorItem("____________________________________________________________________", new Vector2(0, 9.5f));
        }
Esempio n. 2
0
        public ApothecaryMenu(Game1 g, MenuManager mm)
            : base(g, mm)
        {
            ingredient = TextureManager.Map["ingredient"];

            IngredientList invincibility = new IngredientList();
            IngredientList confusion = new IngredientList();
            IngredientList warp = new IngredientList();
            IngredientList midas = new IngredientList();
            IngredientList vampire = new IngredientList();
            IngredientList curse = new IngredientList();
            invincibility.red = 3;
            confusion.green = 1; confusion.blue = 1;
            warp.blue = 2;
            midas.red = 1; midas.blue = 1;
            vampire.red = 1; vampire.green = 1;
            curse.red = 1; curse.green = 1; curse.blue = 1;

            cost.Add(typeof(InvincibilityPotion), invincibility);
            cost.Add(typeof(ConfusionPotion), confusion);
            cost.Add(typeof(WarpPotion), warp);
            cost.Add(typeof(MidasPotion), midas);
            cost.Add(typeof(VampirePotion), vampire);
            cost.Add(typeof(CursePotion), curse);

            ingredients.red = 0;
            ingredients.blue = 0;
            ingredients.green = 0;
        }
Esempio n. 3
0
        public SettingsMenu(Game1 g, MenuManager mm)
            : base(g, mm)
        {
            // pos is proportional to screen size (IE, SCREENWIDTH / 20 * pos)
            AddFlavorItem("Game Settings", new Vector2(1, 1));

            AddFlavorItem("Tooltips", new Vector2(2, 6));
            AddFlavorItem("_______", new Vector2(2, 7));
            AddMenuItem("On", new Vector2(2, 8), 0,
                delegate() { Activate(0, 0); Tooltip.activated = true; });
            AddMenuItem("Off", new Vector2(2, 9), 0,
                delegate() { Activate(0, 1); Tooltip.activated = false; });

            AddFlavorItem("Window\r\nSize", new Vector2(6, 6));
            AddFlavorItem("______", new Vector2(6, 7));
            AddMenuItem("Large", new Vector2(6, 8), 1,
                delegate() { Activate(1, 0); newW = 800; newH = 800; });
            AddMenuItem("Small", new Vector2(6, 9), 1,
                delegate() { Activate(1, 1); newW = 600; newH = 600; });

            AddFlavorItem("Effects", new Vector2(9, 6));
            AddFlavorItem("______", new Vector2(9, 7));
            AddMenuItem("High", new Vector2(9, 8), 2,
                delegate() { Activate(2, 0); GameConst.effectSetting = 2; });
            AddMenuItem("Med", new Vector2(9, 9), 2,
                delegate() { Activate(2, 1); GameConst.effectSetting = 1; });
            AddMenuItem("Low", new Vector2(9, 10), 2,
              delegate() { Activate(2, 2); GameConst.effectSetting = 0; });

            AddMenuItem("Return to menu", new Vector2(1, 16), 0,
                delegate() { BackOut(); });
        }
 public FailedToConnectMenu(Game1 g, MenuManager mm)
     : base(g, mm)
 {
     // pos is proportional to screen size (IE, SCREENWIDTH / 20 * pos)
     AddFlavorItem("Uh Oh! Looks like I was unable to \nconnect to the server! :(\nSorry, man!",
         new Vector2(1, 2));
     AddMenuItem("OK", new Vector2(1, 15), 0,
         delegate() { menuManager.SwitchMenu(menuManager.main); } );
 }
Esempio n. 5
0
        public QuickJoin(Game1 g, MenuManager mm)
            : base(g, mm)
        {
            AddFlavorItem("please enter a server ip", new Vector2(1, 1));
            AddMenuItem(">", new Vector2(2, 2),
                0, delegate() { menuItems[0][0].Deselect(); menuItems[0][1].Select(); yIndex = 1; });

            AddMenuItem("CONNECT", new Vector2(1, 4),
                0, delegate() { menuItems[0][1].Deselect(); menuManager.join.ConnectToServer(ip); });
        }
Esempio n. 6
0
        public EndgameMenu(Game1 g, MenuManager mm)
            : base(g, mm)
        {
            // pos is proportional to screen size (IE, SCREENWIDTH / 20 * pos)
            AddFlavorItem("win/lose", new Vector2(1, 5));

            AddMenuItem("Return to Lobby", new Vector2(1, 15), 0,
                delegate() { menuManager.SwitchMenu(menuManager.lobby); });
            AddMenuItem("Exit to Menu", new Vector2(1, 16), 0,
                delegate() { menuManager.SwitchMenu(menuManager.main); World.Disconnect(); });
        }
Esempio n. 7
0
        public EnterServerMenu(Game1 g, MenuManager mm)
            : base(g, mm)
        {
            AddFlavorItem("please enter a server ip", new Vector2(1, 1));
            AddMenuItem(">", new Vector2(2, 2),
                0, delegate() { menuItems[0][0].Deselect(); menuItems[0][1].Select(); yIndex = 1; });

            AddFlavorItem("please enter a name for the server", new Vector2(1, 4));
            AddMenuItem(">", new Vector2(2, 5),
                0, delegate() { menuItems[0][1].Deselect(); menuItems[0][2].Select(); yIndex = 2; });

            AddMenuItem("DONE", new Vector2(1, 7),
                0, delegate() { menuItems[0][2].Deselect(); menuManager.SwitchMenu(menuManager.join); });
        }
Esempio n. 8
0
        public JoinServerMenu(Game1 g, MenuManager mm)
            : base(g, mm)
        {
            LoadServerInfo();
            // pos is proportional to screen size (IE, SCREENWIDTH / 20 * pos)
            AddMenuItem("Join Server", new Vector2(1, 2), 0,
                delegate() { });
            AddMenuItem("Quick Join", new Vector2(1, 3), 0,
                delegate() { menuManager.SwitchMenu(menuManager.quickJoin); });
            AddMenuItem("Add Server", new Vector2(1, 4), 0,
                delegate() { menuManager.SwitchMenu(menuManager.enterServer); });

            menuItems[0][0].Select();
        }
Esempio n. 9
0
        public MainMenu(Game1 g, MenuManager mm)
            : base(g, mm)
        {
            // pos is proportional to screen size (IE, SCREENWIDTH / 20 * pos)
            AddMenuItem("Start Server", new Vector2(1, 14), 0,
                delegate() { menuManager.SwitchMenu(menuManager.serverSetup); });
            AddMenuItem("Join Server", new Vector2(1, 15), 0,
                delegate() { menuManager.SwitchMenu(menuManager.join); });
            AddMenuItem("Game Settings", new Vector2(1, 16), 0,
                delegate() { menuManager.SwitchMenu(menuManager.settings); });
            AddMenuItem("Credits", new Vector2(1, 17), 0,
                delegate() { menuManager.SwitchMenu(menuManager.credits); });
            AddMenuItem("Quit", new Vector2(1, 18), 0,
                delegate() { game.Exit(); });

            menuItems[0][0].Select();
        }
Esempio n. 10
0
        public TeamChestMenu(Game1 g, MenuManager mm)
            : base(g, mm)
        {
            // pos is proportional to screen size (IE, SCREENWIDTH / 20 * pos)
            AddFlavorItem("YOU", new Vector2(3, 5));
            AddFlavorItem("000", new Vector2(3, 6));

            AddMenuItem(">", new Vector2(10, 6), 0,
                delegate() { AddGold();  });

            AddFlavorItem("TEAM", new Vector2(15, 5));
            AddFlavorItem("000", new Vector2(15, 6));

            AddFlavorItem("Press A to add 50 GOLD to Team chest", new Vector2(1, 15));
            AddFlavorItem("Press B to return", new Vector2(1, 18));

            menuItems[0][0].Select();
        }
Esempio n. 11
0
        public CreditsMenu(Game1 g, MenuManager mm)
            : base(g, mm)
        {
            // pos is proportional to screen size (IE, SCREENWIDTH / 20 * pos)
            AddFlavorItem("Attribution", new Vector2(1, 1));

            AddFlavorItem("Featuring the Musical Stylings of", new Vector2(2, 3));
            AddFlavorItem("Somebody", new Vector2(4, 4));

            AddFlavorItem("The Few, the Brave, the Playtesters", new Vector2(2, 7));
            AddFlavorItem("Christian Beekman", new Vector2(4, 8));
            AddFlavorItem("Nadeem Persico-Shammas", new Vector2(4, 9));
            AddFlavorItem("Jackson Keller", new Vector2(4, 10));
            AddFlavorItem("Samuel Borchart", new Vector2(4, 11));
            AddFlavorItem("Jacob Miller", new Vector2(4, 12));

            AddMenuItem("Return to menu", new Vector2(1, 16), 0,
                delegate() { BackOut(); });
        }
Esempio n. 12
0
        public ServerSetupMenu(Game1 g, MenuManager mm)
            : base(g, mm)
        {
            // pos is proportional to screen size (IE, SCREENWIDTH / 20 * pos)
            AddFlavorItem("Game Type", new Vector2(1, 6));
            AddFlavorItem("_________", new Vector2(1, 7));
            AddMenuItem("Standard", new Vector2(1, 8), 0,
                delegate() { gametype = 0; ActivateItem(0, 0); });

            AddFlavorItem("Number of Players", new Vector2(6, 6));
            AddFlavorItem("_________", new Vector2(6, 7));
            AddMenuItem("2", new Vector2(6, 8), 1,
                delegate() { players = 2; ActivateItem(0, 1); });
            AddMenuItem("3", new Vector2(6, 9), 1,
                delegate() { players = 3; ActivateItem(1, 1); });
            AddMenuItem("4", new Vector2(6, 10), 1,
                delegate() { players = 4; ActivateItem(2, 1); });
            AddMenuItem("5", new Vector2(6, 11), 1,
                delegate() { players = 5; ActivateItem(3, 1); });
            AddMenuItem("6", new Vector2(6, 12), 1,
                delegate() { players = 6; ActivateItem(4, 1); });

            AddFlavorItem("Map", new Vector2(13, 6));
            AddFlavorItem("_________", new Vector2(13, 7));
            AddMenuItem("Random", new Vector2(13, 8), 2,
                delegate() { map = "random"; ActivateItem(0, 2); });
            AddMenuItem("Raceways", new Vector2(13, 9), 2,
                            delegate() { map = "raceways"; ActivateItem(1, 2); });
            AddMenuItem("Catacombs", new Vector2(13, 10), 2,
                delegate() { map = "catacombs"; ActivateItem(2, 2); });
            AddMenuItem("Piety", new Vector2(13, 11), 2,
                delegate() { map = "piety"; ActivateItem(3, 2); });

            AddMenuItem("START\nSERVER", new Vector2(17, 8), 3,
               delegate() { StartServer();  });
        }
Esempio n. 13
0
        public static void Init(GraphicsDeviceManager g, ContentManager c, Game1 g1)
        {
            game = g1;
            map = new TileSet();
            cam = new Camera(g);
            menuManager = new MenuManager(game);
            content = c;

            InitEndgameStruct();
        }
Esempio n. 14
0
 public Menu(Game1 g, MenuManager mm)
 {
     menuManager = mm;
     game = g;
 }
Esempio n. 15
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            Window.AllowUserResizing = false;
            graphics.PreferredBackBufferWidth = GameConst.SCREEN_WIDTH;
            graphics.PreferredBackBufferHeight = GameConst.SCREEN_HEIGHT;
            graphics.ApplyChanges();
            if (Console.Enabled)
            { Console.Init(); }
            TextureManager.Initialize(Content);
            World.Init(graphics, Content, this);
            Shadowmap.Init(this, graphics.GraphicsDevice, Content);
            Tooltip.Init();
            Hud.Init();
            SoundManager.Init(Content);
            menu = new MenuManager(this);
            //menu.settings.Init();

            base.Initialize();
        }
Esempio n. 16
0
 public CapitalistMenu(Game1 g, MenuManager mm)
     : base(g, mm)
 {
 }