Пример #1
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);

            _UIManager = new UI.UIManager();
            _UIManager.LoadContent(Content);

            UI.MainMenuPanel mm = new UI.MainMenuPanel(_UIManager);
            mm.LoadContent("Panel");
            mm.SetSize(new Vector2(50, 202));
            mm.Setup();
            mm.SetPosition(new Vector2(-45, 150));
            _UIManager.AddPanel(mm);

            UI.StoreUIPanel storePanel = new UI.StoreUIPanel(_UIManager);
            storePanel.LoadContent("Panel");
            storePanel.SetSize(new Vector2(500, 300));
            storePanel.Setup();
            storePanel.SetPosition(new Vector2(100, 100));
            _UIManager.AddPanel(storePanel);


            _UIManager.TogglePanel("Store");


            floorTex = Content.Load <Texture2D>(@"Art/Rocks");
            bgTex    = Content.Load <Texture2D>(@"Art/bg");

            Fishies     = new List <Fish>();
            fishEggList = new List <FishEgg>();


            PelletList          = new List <FoodPellet>();
            BubbleList          = new List <Bubble>();
            WaterLineSprites    = new List <Waterline>();
            WhirlpoolbubbleList = new List <WhirlPoolBubble>();

            for (int i = -1; (i < (GraphicsDevice.Viewport.Width / 32) + 3); i++)
            {
                Waterline nl = new Waterline();
                nl._Position.X = 32 * i;
                nl._Position.Y = 70;
                nl.LoadContent(@"Art/Waterline", Content);
                WaterLineSprites.Add(nl);
            }

            aerator = new Aerator();
            aerator.LoadContent(@"Art/Aerator", Content);
            aerator._Position = new Vector2(150, GraphicsDevice.Viewport.Height - 40);
            // TODO: use this.Content to load your game content here
        }
Пример #2
0
 public UIListContainer(UIManager uim) : base(uim)
 {
     itemsList = new List <UIElement>();
 }