Beispiel #1
0
 void Start()
 {
     // Initialization
     fFlockWeight = 1f;
     // Number behind makes sure the seek weight is so small that the nutrient never mve away from the main cell
     fSeekWeight       = .24f / Mathf.Sqrt(Mathf.Sqrt(Mathf.Sqrt((float)EMController.Instance().NutrientNum + 50f)));
     fNeighbourRadius  = 1f;
     fAlignmentWeight  = .6f;
     fCohesionWeigth   = .6f;
     fSeperationWeight = .8f;
     // Add this behavior to the agent
     agent = GetComponent <EMNutrientMainAgent>();
     agent.AddBehaviour(this);
 }
 void Start()
 {
     // Initialization
     fFlockWeight = 1f;
     // Number behind makes sure the seek weight is so small that the nutrient never mve away from the main cell
     fSeekWeight = .24f / Mathf.Sqrt(Mathf.Sqrt(Mathf.Sqrt((float)EMController.Instance().NutrientNum + 50f)));
     fNeighbourRadius = 1f;
     fAlignmentWeight = .6f;
     fCohesionWeigth = .6f;
     fSeperationWeight = .8f;
     // Add this behavior to the agent
     agent = GetComponent<EMNutrientMainAgent>();
     agent.AddBehaviour(this);
 }