Exemple #1
0
        /// <summary>
        /// LoadContent laad alle objecten. Dit gebeurd maar één keer tijdens het laden van het spel.
        /// </summary>
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);

            PlantFactory.LoadContent(Content);

            for (int i = 0; i < dirtFields.Length; i++)
            {
                dirtFields[i] = new Dirt(this, new Vector2(50 + i * 200, 50), 180, 180);
                dirtFields[i].LoadContent(Content);
            }

            MenuManager.LoadContent(graphics, Content);
            StoreManager.LoadContent(graphics, Content);

            StoreManager.SetSeedInventoryAmount(PlantList.Ananas, 10);

            //Alle plaatjes van de vruchten
            plantzaadjesImage = Content.Load <Texture2D>("Images/plantzaadjes");
            storeButtonImage  = Content.Load <Texture2D>("Images/ic_shopping_basket_black_24dp_2x");
            grassImage        = Content.Load <Texture2D>("Images/grass");
            closeImage        = Content.Load <Texture2D>("Images/close_black");

            titleFont  = Content.Load <SpriteFont>("AlertTitle");
            spriteFont = Content.Load <SpriteFont>("Arial");

            dummyTexture = new Texture2D(graphics.GraphicsDevice, 1, 1);
            dummyTexture.SetData(new Color[] { Color.White });
        }
Exemple #2
0
 /// <summary>
 /// Constructor voor MenuItem. Deze constructor wordt alleen gebruikt wanneer de dirt veld leeg is.
 /// </summary>
 /// <param name="plant">De plant over waar deze optie gaat.</param>
 /// <param name="dirt">De dirt object waar het is aangekoppeld.</param>
 protected MenuItem(PlantList plant, Dirt dirt)
 {
     this.plant  = plant;
     this.dirt   = dirt;
     this.action = false;
 }
Exemple #3
0
 /// <summary>
 /// Constructor voor MenuItem. Deze constructor wordt alleen gebruikt wanneer de MenuItem een sub-actie is.
 /// </summary>
 /// <param name="dirt"></param>
 /// <param name="action"></param>
 protected MenuItem(Dirt dirt, Boolean action)
 {
     this.dirt   = dirt;
     this.action = action;
 }
Exemple #4
0
 public MenuItemHarvest(Dirt dirt) : base(dirt, true)
 {
 }