public Boid(World world, Texture2D texture) { this.World = world; this.Texture = texture; this.position = new Vector2((float)BoidsScreen.RANDOM.NextDouble() * BoidsScreen.WIDTH, (float)BoidsScreen.RANDOM.NextDouble() * BoidsScreen.HEIGHT); this.velocity = new Vector2(BoidsScreen.RANDOM.Next(-MAX_SPEED, MAX_SPEED), BoidsScreen.RANDOM.Next(-MAX_SPEED, MAX_SPEED)); }
public void OnCreate(GraphicsDevice device) { this.Camera = new Camera2D(device, WIDTH, HEIGHT); this.World = new World(); }