public void Init() { dna1 = new HumanDNA(DNALength, 6); m_Character = GetComponent <ThirdPersonCharacter> (); timeAlive = 0; alive = true; startPosition = this.transform.position; }
public void Combine(HumanDNA d1, HumanDNA d2) { for (int i = 0; i < dnaLength; i++) { if (i < dnaLength / 2.0) { int c = d1.genes [i]; genes [i] = c; } else { int c = d2.genes [2]; genes [i] = c; } } }