public LevelSelectScreen(GameScreen gamescreen)
     : base("Level Select")
 {
     AddMenuItem("Tutorial", EntryType.GoToLevel, gamescreen);
     AddMenuItem("Level One",EntryType.GoToLevel, gamescreen);
     AddMenuItem("Level Two", EntryType.GoToLevel, gamescreen);
     
 }
 /// <summary>
 /// Constructs a new menu entry with the specified text.
 /// </summary>
 public MenuEntry(MenuScreen menu, string text, EntryType type, GameScreen screen)
 {
     _text = text;
     _screen = screen;
     _type = type;
     _menu = menu;
     _scale = 0.9f;
     _alpha = 1.0f;
 }
 /// <summary>
 /// Constructs a new menu entry with the specified text.
 /// </summary>
 public MenuButton(Texture2D sprite, bool flip, Vector2 position, GameScreen screen)
 {
     _screen = screen;
     _scale = 1f;
     _sprite = sprite;
     _baseOrigin = new Vector2(_sprite.Width / 2f, _sprite.Height / 2f);
     _hover = false;
     _flip = flip;
     Position = position;
 }
示例#4
0
 public ScoreSection(bool flip, Vector2 position, GameScreen screen, string desc, int outof, int achieved, int overallloops, int maxcomboreached)
 {
     _flip = flip;
     _position = position;
     _screen = screen;
     _rect.Width = 250;
     _rect.Height = 300;
     _description = desc;
     _achieved = achieved;
     _outof = outof;
     _color = Color.Black;
     _overAllLoops = overallloops;
     _maxComboReached = maxcomboreached;
     _lineSpace = 10;
 }
示例#5
0
        /// <summary>
        /// Constructs a new menu entry with the specified text.
        /// </summary>
        /// 
        public MenuEntry(MenuScreen menu, string text, EntryType type, GameScreen screen, Texture2D texture)
        {
            _text = text;
            _screen = screen;
            _type = type;
            _menu = menu;
            #if NETFX_CORE
            BaseScale = 1f;
            #else
            BaseScale = 1f;
            #endif
            _scale = 0.7f;

            _alpha = 1.0f;
            _menuItemBackground = texture;
        }
示例#6
0
 public ScoreSection(bool flip, Vector2 position, GameScreen screen, string desc, int outof, int achieved, int overallloops, int maxcomboreached)
 {
     _flip = flip;
     _position = position + _containerMargin;
     _screen = screen;
     _rect.Width = 250;
     _rect.Height = 300;
     _innerRect.Width = _rect.Width - BorderThickness;
     _innerRect.Height = _rect.Height - BorderThickness;
     _description = desc;
     _perecentComplete = (int)(((float)achieved / (float)outof) * 100);
     _achieved = achieved;
     _outof = outof;
     _color = Color.Black;
     _overAllLoops = overallloops;
     _maxComboReached = maxcomboreached;
 }
        /// <summary>
        /// Removes a screen from the screen manager. You should normally
        /// use GameScreen.ExitScreen instead of calling this directly, so
        /// the screen can gradually transition off rather than just being
        /// instantly removed.
        /// </summary>
        public void RemoveScreen(GameScreen screen)
        {
            // If we have a graphics device, tell the screen to unload content.
            if (_isInitialized)
            {
                screen.UnloadContent();
            }

            _screens.Remove(screen);
            _screensToUpdate.Remove(screen);

            // if there is a screen still in the manager, update TouchPanel
            // to respond to gestures that screen is interested in.
            if (_screens.Count > 0)
            {
                TouchPanel.EnabledGestures = _screens[_screens.Count - 1].EnabledGestures;
            }
        }
        /// <summary>
        /// Adds a new screen to the screen manager.
        /// </summary>
        public void AddScreen(GameScreen screen)
        {
            screen.ScreenManager = this;
            screen.IsExiting = false;

            // If we have a graphics device, tell the screen to load content.
            if (_isInitialized)
            {
                screen.LoadContent();
            }

            _screens.Add(screen);

            // update the TouchPanel to respond to gestures this screen is interested in
            TouchPanel.EnabledGestures = screen.EnabledGestures;
        }
示例#9
0
 public void AddMenuItem(string name, EntryType type, GameScreen screen)
 {
     MenuEntry entry = new MenuEntry(this, name, type, screen);
     _menuEntries.Add(entry);
 }
示例#10
0
 public MenuEntry(MenuScreen menu, string text, EntryType type, GameScreen screen, Texture2D texture, PhysicsGameScreen phyisicsscreen)
     : this(menu, text, type, screen, texture)
 {
     _phyisicsGameScreen = phyisicsscreen;
 }
示例#11
0
        public void AddLevelMenuItem(string name, EntryType type, GameScreen screen, PhysicsGameScreen physicsscreen)
        {
            MenuEntry entry = new MenuEntry(this, name, type, screen, _menuItemBackground, physicsscreen);

            _menuEntries.Add(entry);
        }
示例#12
0
        public void AddMenuItem(string name, EntryType type, GameScreen screen)
        {
            MenuEntry entry = new MenuEntry(this, name, type, screen, _menuItemBackground);

            _menuEntries.Add(entry);
        }
示例#13
0
 public void AddLevelMenuItem(string name, EntryType type, GameScreen screen, PhysicsGameScreen physicsscreen)
 {
     MenuEntry entry = new MenuEntry(this, name, type, screen,_menuItemBackground, physicsscreen);
     _menuEntries.Add(entry);
 }