Example #1
0
 public Resource(ResourceManager resManager, float x, float y, Texture2D texture)
     : base(x, y)
 {
     this.resManager = resManager;
     this.Texture = texture;
     Initialiser();
 }
Example #2
0
        public GameWorld(Game1 gameRef)
        {
            this.gameRef = gameRef;
            entityManager = new EntityManager(this);

            resourceManager = new ResourceManager(this);
            HerbivoreGroup = new CreatureGroup(CreatureType.Herbivore, this);
            CarnivoreGroup = new CreatureGroup(CreatureType.Carnivore, this);
            OmnivoreGroup = new CreatureGroup(CreatureType.Omnivore, this);

            // Create entities
            resourceManager.CreateResourceCluster(15, 150, new Vector2(150, 150));
            resourceManager.CreateResourceCluster(15, 150, new Vector2(Game1.ScreenBounds.Width - 150, 150));
            resourceManager.CreateResourceCluster(15, 150, new Vector2(150, Game1.ScreenBounds.Height - 150));
            resourceManager.CreateResourceCluster(15, 150, new Vector2(Game1.ScreenBounds.Width - 150, Game1.ScreenBounds.Height - 150));
            resourceManager.CreateResourceCluster(15, 150, new Vector2((Game1.ScreenBounds.Width - 150) / 2, (Game1.ScreenBounds.Height - 150) / 2));

            HerbivoreGroup.CreatePopulation(50);
            CarnivoreGroup.CreatePopulation(50);
            OmnivoreGroup.CreatePopulation(50);

            entityManager.LoadContent(gameRef.Content);
        }
Example #3
0
 public Resource(ResourceManager resManager, float x, float y)
     : base(x, y)
 {
     this.resManager = resManager;
     Initialiser();
 }