Ejemplo n.º 1
0
 private Organism CreateOrganism(string name)
 {
     GameObject body = AddTank();
     Vector3 inputVal = UnityTools.ClosestWithTag(tank, "point").transform.position;
     ann brain = new ann(6, 3, 2, 5, new List<float>() { tank.transform.position.x,
                                                             tank.transform.position.y,
                                                             tank.transform.position.z,
                                                             inputVal.x,
                                                             inputVal.y,
                                                             inputVal.z});
     chromosome dna = new chromosome(24, ecosystem);
     Organism thisOrg = new Organism(body, brain, dna, ecosystem);
     thisOrg.name = name;
     body.name = name;
     totalPopulation++;
     StartCoroutine(thisOrg.BodyClock());
     Log.Add(name + "was born.");
     return thisOrg;
 }