public void Reproduce(Creature other) { if (Genotype.Compare(other.Genotype) > 1 - MAXGENDIFFREP) { GameManager.instance.SpawnCreature(BrainMaker.OneSizeBrain(this, this), Genotype); } else { Debug.Log("creature too different"); } }
public void SpawnCreature(GeneticCode GCode) { if (creatures.Count < MaxCreature) { Creature newCreature = Instantiate(toInst); newCreature.Init(BrainMaker.OneSizeBrain(newCreature), GCode, new Vector2(0, 0), new Vector2(1, 0)); creatures.Add(newCreature); } }