public MenuScreenTest()
            : base("MenuScreenTest")
        {
            MenuEntry one = new MenuEntry("PlayScreen");
            MenuEntry two = new MenuEntry("ModelAndText");
            MenuEntry three = new MenuEntry("ModelScreen");
            MenuEntry four = new MenuEntry("PlayScreen");

            one.Selected += new EventHandler<EventArgs>(one_Selected);
            two.Selected += new EventHandler<EventArgs>(two_Selected);
            three.Selected += new EventHandler<EventArgs>(three_Selected);
            four.Selected += new EventHandler<EventArgs>(four_Selected);

            items = new List<MenuEntry>();
            items.Add(one);
            items.Add(two);
            items.Add(three);
            items.Add(four);

            menuModel = ScreenManager.Game.Content.Load<Model>("MainMenu\\oilBarrel_MainMenu");
            menuTransforms = new Matrix[menuModel.Bones.Count];
            menuModel.CopyAbsoluteBoneTransformsTo(menuTransforms);

            cameraManager = (CameraManager)ScreenManager.Game.Services.GetService(typeof(CameraManager));
            cameraManager.SetPosition(new Vector3(0.0f, 0.0f, 500.0f));
            cameraManager.SetLookAtPoint(new Vector3(0.0f, 0.0f, 50.0f));
            //cameraManager.SetPosition(new Vector3(0.0f, 1700.0f, 500.0f));
            //cameraManager.SetLookAtPoint(new Vector3(0.0f, 0.0f, -500.0f));

            menuPosition = new Vector3(100.0f, 0.0f, 0.0f);

            arrows = new Texture2D[2];
            arrows[0] = ScreenManager.Game.Content.Load<Texture2D>("MainMenu\\left_arrow");
            arrows[1] = ScreenManager.Game.Content.Load<Texture2D>("MainMenu\\right_arrow");

            arrow_locations_min = new Vector2[2];
            arrow_locations_max = new Vector2[2];
            arrow_locations_min[0] = new Vector2(550.0f, 320.0f);
            arrow_locations_min[1] = new Vector2(1050.0f, 320.0f);
            arrow_locations_max[0] = new Vector2(530.0f, 320.0f);
            arrow_locations_max[1] = new Vector2(1070.0f, 320.0f);
            selected = 0;
            arrowUpdateTime = 0;
            currentArrowIndex = 0;

            a_button = ScreenManager.Game.Content.Load<Texture2D>("MainMenu\\a_button");
            a_button_position = new Vector2(720.0f, 600.0f);
            font = ScreenManager.Game.Content.Load<SpriteFont>("MainMenu\\font");
            text_position = new Vector2(790.0f, 600.0f);

            tickEffect = ScreenManager.Game.Content.Load<SoundEffect>("Sounds\\Effects\\explosion");
        }
        public MenuScreenTest()
            : base("MenuScreenTest")
        {
            MenuEntry one = new MenuEntry("TileTestScreen");
            MenuEntry two = new MenuEntry("ModelAndText");
            MenuEntry three = new MenuEntry("ModelScreen");
            MenuEntry four = new MenuEntry("PlayScreen");

            one.Selected += new EventHandler<EventArgs>(one_Selected);
            two.Selected += new EventHandler<EventArgs>(two_Selected);
            three.Selected += new EventHandler<EventArgs>(three_Selected);
            four.Selected += new EventHandler<EventArgs>(four_Selected);

            AddMenuEntry(one);
            AddMenuEntry(two);
            AddMenuEntry(three);
            AddMenuEntry(four);
        }
예제 #3
0
 public void AddMenuEntry(MenuEntry menuEntry)
 {
     menuEntries.Add(menuEntry);
 }