/// <summary>
 /// Flocking behaviour for constructor
 /// </summary>
 /// <param name="boid">Reference to boid</param>
 public FlockingBehaviour(Boid boid)
 {
     this.MaxForce = 0.05f;
     this.VelocityDamping = 1f;
     this.SeparationFactor = 1.5f;
     this.Boid = boid;
     this.environmentManager = EnvironmentManager.Shared();
 }
Exemplo n.º 2
0
 /// <summary>
 /// Constructor for boid manager
 /// </summary>
 /// <param name="numberOfBoids">Number of boids to manage</param>
 /// <param name="genderBias">Simulation gender bias constraint</param>
 public BoidManager(int numberOfBoids, float genderBias)
 {
     environmentManager = EnvironmentManager.Shared();
     this.numberOfBoids = numberOfBoids;
     this.genderBias = genderBias;
     Boids = new List<Boid>(this.numberOfBoids);
     heatMap = new HeatMap(Boids);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Intialises Bootstrapper
 /// </summary>
 void Awake()
 {
     Pause = false;
     EnvironmentManager = new EnvironmentManager();
     CameraManager = new CameraManager();
 }
 /// <summary>
 /// Enforces the singleton nature of Environment manager
 /// </summary>
 private void initSingleton()
 {
     // Set the 'shared' variable as this environment manager
     if (shared == null) {
         shared = this;
     } else {
         throw new InvalidOperationException("Singleton already setup");
     }
 }