Exemple #1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
Exemple #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);
        }