public Wildlife(SimEngine sim)
        {
            this.sim = sim;

            Random r = new Random();
            int nBirds = 90;
            birdFlock = new Flock(nBirds);
            for (int i = 0; i < nBirds; i++)
            {
                Bird bird = new Bird(new Vector3(r.Next(1000),r.Next(50,200), r.Next(1000)), sim.World);
                birdFlock.AddAgent(bird);
                targets.Add(bird);
            }
        }
        public Wildlife(SimEngine sim)
        {
            this.sim = sim;

            Random r      = new Random();
            int    nBirds = 90;

            birdFlock = new Flock(nBirds);
            for (int i = 0; i < nBirds; i++)
            {
                Bird bird = new Bird(new Vector3(r.Next(1000), r.Next(50, 200), r.Next(1000)), sim.World);
                birdFlock.AddAgent(bird);
                targets.Add(bird);
            }
        }
Esempio n. 3
0
 static void Main(string[] args)
 {
     using (SimEngine sim = new SimEngine())
         sim.Run();
 }
            static void Main(string[] args)
            {

                using (SimEngine sim = new SimEngine())
                    sim.Run();
            }