public Creature(CreatureGroup group, float x, float y, Chromosome chromo = null) : base(x, y) { this.group = group; if (chromo != null) { chromosome = chromo; } else { chromosome = new Chromosome(); } SetProperties(); }
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); }
public Omnivore(CreatureGroup group, float x, float y, Chromosome chromo = null) : base(group, x, y) { }