public Organism CreateOrganismGrass() { var xVelocity = 0; var yVelocity = 0; var organism = new Grass(OrganismTexture, GetOrganismColor(OrganismType.GRASS), 25, new Vector2(Rando.Next(-500,500) + 500, Rando.Next(-500,500) + 500), new Vector2(xVelocity, yVelocity), Organism.OrganismType.GRASS, 1f, 100f, 5f, new Dictionary<Organism.OrganismType, Reaction>()); return organism; }
public override Organism Reproduce() { Vector2 startPos = Position + new Vector2(Rando.Next(-25, 25), Rando.Next(-25, 25)); while (startPos.X < 0 || startPos.X > 1000 || startPos.Y < 0 || startPos.Y > 1000) { startPos = Position + new Vector2(Rando.Next(-25, 25), Rando.Next(-25, 25)); } Grass o = new Grass(Texture, Color, Radius, startPos, new Vector2(0, 0), MyType, Energy / 2, VisionRadius, ReproductionThreshold, ReactionDictionary); Energy = Energy / 2; return o; }