Пример #1
0
        public SplitScreen(MenuEngine m, CoreEngine g)
        {
            menuEngine = m;
            coreEngine = g;

            menuItems.Add(new MenuItem("Split Screen", MenuState.Null));
        }
Пример #2
0
        public PauseMenu(MenuEngine m, CoreEngine g)
        {
            menuEngine = m;
            coreEngine = g;

            menuItems.Add(new MenuItem("Pause Menu", MenuState.Null));
            menuItems.Add(new MenuItem("Resume Game", MenuState.ResumeGame));
            menuItems.Add(new MenuItem("Main Menu", MenuState.MainMenu));
        }
Пример #3
0
 public SinglePlayerScreen(MenuEngine m, CoreEngine g)
 {
     coreEngine = g;
     menuEngine = m;
     menuItems.Add(new MenuItem("Single Player Menu", MenuState.Null));
     menuItems.Add(new MenuItem("Start Playing", MenuState.StartGame));
     menuItems.Add(new MenuItem("Number of Bots: ", MenuState.BotOptions));
     menuItems.Add(new MenuItem("Map Select: ", MenuState.SelectMap));
     //menuItems.Add(new MenuItem("Exit", MenuState.Exit));
 }
Пример #4
0
 public MainMenuScreen(MenuEngine m, CoreEngine g)
 {
     coreEngine = g;
     menuEngine = m;
     menuItems.Add(new MenuItem("Main Menu", MenuState.Null));
     menuItems.Add(new MenuItem("Single Player", MenuState.SinglePlayer));
     menuItems.Add(new MenuItem("Split Screen", MenuState.SplitScreen));
     //menuItems.Add(new MenuItem("Options", MenuState.Options));
     menuItems.Add(new MenuItem("Exit", MenuState.Exit));
 }
Пример #5
0
 public BotNumberMenuScreen(MenuEngine m, CoreEngine g)
 {
     menuEngine = m;
     coreEngine = g;
     menuItems.Add(new MenuItem("Bot Options", MenuState.Null));
     menuItems.Add(new MenuItem("1", MenuState.Null));
     menuItems.Add(new MenuItem("2", MenuState.Null));
     menuItems.Add(new MenuItem("3", MenuState.Null));
     menuItems.Add(new MenuItem("4", MenuState.Null));
     menuItems.Add(new MenuItem("5", MenuState.Null));
     menuItems.Add(new MenuItem("6", MenuState.Null));
     menuItems.Add(new MenuItem("7", MenuState.Null));
 }
Пример #6
0
 public BotNumberMenuScreen(MenuEngine m, CoreEngine g)
 {
     menuEngine = m;
     coreEngine = g;
     menuItems.Add(new MenuItem("Bot Options", MenuState.Null));
     menuItems.Add(new MenuItem("1", MenuState.Null));
     menuItems.Add(new MenuItem("2", MenuState.Null));
     menuItems.Add(new MenuItem("3", MenuState.Null));
     menuItems.Add(new MenuItem("4", MenuState.Null));
     menuItems.Add(new MenuItem("5", MenuState.Null));
     menuItems.Add(new MenuItem("6", MenuState.Null));
     menuItems.Add(new MenuItem("7", MenuState.Null));
 }
Пример #7
0
 public LoadScreen(MenuEngine m, CoreEngine g)
 {
     coreEngine = g;
     menuEngine = m;
     type = "Title";
 }
Пример #8
0
        public SplitScreen(MenuEngine m, CoreEngine g)
        {
            menuEngine = m;
            coreEngine = g;

            menuItems.Add(new MenuItem("Split Screen", MenuState.Null));
        }
Пример #9
0
 public SinglePlayerScreen(MenuEngine m, CoreEngine g)
 {
     coreEngine = g;
     menuEngine = m;
     menuItems.Add(new MenuItem("Single Player Menu", MenuState.Null));
     menuItems.Add(new MenuItem("Start Playing", MenuState.StartGame));
     menuItems.Add(new MenuItem("Number of Bots: ", MenuState.BotOptions));
     menuItems.Add(new MenuItem("Map Select: ", MenuState.SelectMap));
     //menuItems.Add(new MenuItem("Exit", MenuState.Exit));
 }
Пример #10
0
        public PauseMenu(MenuEngine m, CoreEngine g)
        {
            menuEngine = m;
            coreEngine = g;

            menuItems.Add(new MenuItem("Pause Menu", MenuState.Null));
            menuItems.Add(new MenuItem("Resume Game", MenuState.ResumeGame));
            menuItems.Add(new MenuItem("Main Menu", MenuState.MainMenu));
        }
Пример #11
0
 public MainMenuScreen(MenuEngine m, CoreEngine g)
 {
     coreEngine = g;
     menuEngine = m;
     menuItems.Add(new MenuItem("Main Menu", MenuState.Null));
     menuItems.Add(new MenuItem("Single Player", MenuState.SinglePlayer));
     menuItems.Add(new MenuItem("Split Screen", MenuState.SplitScreen));
     //menuItems.Add(new MenuItem("Options", MenuState.Options));
     menuItems.Add(new MenuItem("Exit", MenuState.Exit));
 }
Пример #12
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.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            //load the trextures
            textures = new Dictionary<string, Texture2D>();
            explosionTextures = new Dictionary<string, Texture2D>();
            explosionTextures["rocket"] = Content.Load<Texture2D>("weaponTrails/explosion");
            explosionTextures["shock"] = Content.Load<Texture2D>("weaponTrails/shock_ball");
            /*textures.Add("base_floor/pool_side2", Content.Load<Texture2D>("textures/base_floor/pool_side2"));
            textures.Add("base_wall/atech1_f", Content.Load<Texture2D>("textures/base_wall/atech1_f"));
            textures.Add("sfx/xmetalfloor_wall_5b", Content.Load<Texture2D>("textures/sfx/xmetalfloor_wall_5b"));
            textures.Add("ctf/metal_b", Content.Load<Texture2D>("textures/ctf/metal_b"));
            textures.Add("ctf/clangdark", Content.Load<Texture2D>("textures/ctf/clangdark"));
            textures.Add("ctf/pittedrust3stripes_fix", Content.Load<Texture2D>("textures/ctf/pittedrust3stripes_fix"));
            textures.Add("common/caulk", Content.Load<Texture2D>("textures/common/caulk"));
            textures.Add("emergence/floor_hex", Content.Load < Texture2D("textures/emgergence/floor_hex"));*/
            using (System.IO.StreamReader sr = System.IO.File.OpenText("Content/textures/texturelist.txt"))
            {
                string tex = "";
                while ((tex = sr.ReadLine()) != null)
                {
                    tex = tex.Trim();
                    if (tex.Length > 0 && !tex.StartsWith("//"))
                        textures.Add(tex, Content.Load<Texture2D>("textures/" + tex));
                }
            }

            //load trails for weapons
            weaponTrailTextures = new Dictionary<string, Texture2D>();
            using (System.IO.StreamReader sr = System.IO.File.OpenText("Content/weaponTrails/weapontraillist.txt")) {
                string tex = "";
                while ((tex = sr.ReadLine()) != null) {
                    tex = tex.Trim();
                    string[] split = Regex.Split(tex, @"\s+");
                    weaponTrailTextures.Add(split[0], Content.Load<Texture2D>("weaponTrails/" + split[1]));
                }
            }

            //load weapon icons
            weaponIcons = new Dictionary<Type, Texture2D>();
            //weaponIcons[new Weapons.FlakCannon().GetType()] = Content.Load<Texture2D>("WeaponIcons/icon_flakk");
            weaponIcons[new Weapons.Pistol().GetType()] = Content.Load<Texture2D>("WeaponIcons/icon_pistol");
            weaponIcons[new Weapons.Railgun().GetType()] = Content.Load<Texture2D>("WeaponIcons/icon_railgun");
            weaponIcons[new Weapons.Rifle().GetType()] = Content.Load<Texture2D>("WeaponIcons/icon_rifle");
            weaponIcons[new Weapons.RocketLauncher().GetType()] = Content.Load<Texture2D>("WeaponIcons/icon_rocket");
            weaponIcons[new Weapons.ShockRifle().GetType()] = Content.Load<Texture2D>("WeaponIcons/icon_shock");
            weaponIcons[new Weapons.Shotgun().GetType()] = Content.Load<Texture2D>("WeaponIcons/icon_shotgun");

            hudIcons = new Dictionary<string, Texture2D>();
            hudIcons["Health"] = Content.Load<Texture2D>("WeaponIcons/icon_health");

            //load menu content
            cogModel = Content.Load<Model>("CogAttempt");
            cogTexture = Content.Load<Texture2D>("line");

            //load shader
            lighting = Content.Load<Effect>("PointLighting");

            menuEngine = new MenuEngine(this);

            debugFont = Content.Load<SpriteFont>("debugFont");
            debugSphere = Content.Load<Model>("SphereHighPoly");
            medicross = Content.Load<Model>("Medicross");
            ammoUp = Content.Load<Model>("bullets");
            arrow = Content.Load<Model>("arrow");
            steve = Content.Load<Model>("Steve");

            //loadMap("Content/maps/test2.map");
            //startGame("test2", new bool[] { true, false, true, false });
        }
Пример #13
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.
            spriteBatch = new SpriteBatch(GraphicsDevice);


            //load the trextures
            textures                    = new Dictionary <string, Texture2D>();
            explosionTextures           = new Dictionary <string, Texture2D>();
            explosionTextures["rocket"] = Content.Load <Texture2D>("weaponTrails/explosion");
            explosionTextures["shock"]  = Content.Load <Texture2D>("weaponTrails/shock_ball");

            /*textures.Add("base_floor/pool_side2", Content.Load<Texture2D>("textures/base_floor/pool_side2"));
             * textures.Add("base_wall/atech1_f", Content.Load<Texture2D>("textures/base_wall/atech1_f"));
             * textures.Add("sfx/xmetalfloor_wall_5b", Content.Load<Texture2D>("textures/sfx/xmetalfloor_wall_5b"));
             * textures.Add("ctf/metal_b", Content.Load<Texture2D>("textures/ctf/metal_b"));
             * textures.Add("ctf/clangdark", Content.Load<Texture2D>("textures/ctf/clangdark"));
             * textures.Add("ctf/pittedrust3stripes_fix", Content.Load<Texture2D>("textures/ctf/pittedrust3stripes_fix"));
             * textures.Add("common/caulk", Content.Load<Texture2D>("textures/common/caulk"));
             * textures.Add("emergence/floor_hex", Content.Load < Texture2D("textures/emgergence/floor_hex"));*/
            using (System.IO.StreamReader sr = System.IO.File.OpenText("Content/textures/texturelist.txt"))
            {
                string tex = "";
                while ((tex = sr.ReadLine()) != null)
                {
                    tex = tex.Trim();
                    if (tex.Length > 0 && !tex.StartsWith("//"))
                    {
                        textures.Add(tex, Content.Load <Texture2D>("textures/" + tex));
                    }
                }
            }

            //load trails for weapons
            weaponTrailTextures = new Dictionary <string, Texture2D>();
            using (System.IO.StreamReader sr = System.IO.File.OpenText("Content/weaponTrails/weapontraillist.txt")) {
                string tex = "";
                while ((tex = sr.ReadLine()) != null)
                {
                    tex = tex.Trim();
                    string[] split = Regex.Split(tex, @"\s+");
                    weaponTrailTextures.Add(split[0], Content.Load <Texture2D>("weaponTrails/" + split[1]));
                }
            }

            //load weapon icons
            weaponIcons = new Dictionary <Type, Texture2D>();
            //weaponIcons[new Weapons.FlakCannon().GetType()] = Content.Load<Texture2D>("WeaponIcons/icon_flakk");
            weaponIcons[new Weapons.Pistol().GetType()]         = Content.Load <Texture2D>("WeaponIcons/icon_pistol");
            weaponIcons[new Weapons.Railgun().GetType()]        = Content.Load <Texture2D>("WeaponIcons/icon_railgun");
            weaponIcons[new Weapons.Rifle().GetType()]          = Content.Load <Texture2D>("WeaponIcons/icon_rifle");
            weaponIcons[new Weapons.RocketLauncher().GetType()] = Content.Load <Texture2D>("WeaponIcons/icon_rocket");
            weaponIcons[new Weapons.ShockRifle().GetType()]     = Content.Load <Texture2D>("WeaponIcons/icon_shock");
            weaponIcons[new Weapons.Shotgun().GetType()]        = Content.Load <Texture2D>("WeaponIcons/icon_shotgun");

            hudIcons           = new Dictionary <string, Texture2D>();
            hudIcons["Health"] = Content.Load <Texture2D>("WeaponIcons/icon_health");

            //load menu content
            cogModel   = Content.Load <Model>("CogAttempt");
            cogTexture = Content.Load <Texture2D>("line");

            //load shader
            lighting = Content.Load <Effect>("PointLighting");


            menuEngine = new MenuEngine(this);


            debugFont   = Content.Load <SpriteFont>("debugFont");
            debugSphere = Content.Load <Model>("SphereHighPoly");
            medicross   = Content.Load <Model>("Medicross");
            ammoUp      = Content.Load <Model>("bullets");
            arrow       = Content.Load <Model>("arrow");
            steve       = Content.Load <Model>("Steve");

            //loadMap("Content/maps/test2.map");
            //startGame("test2", new bool[] { true, false, true, false });
        }
Пример #14
0
 public TitleScreen(MenuEngine m, CoreEngine g)
 {
     coreEngine = g;
     menuEngine = m;
     type       = "Title";
 }