private void CalculatingDominateGene() { float geneStrength = 0; int selectedGene = 0; if (totalGenes.Count > 1) { for (int i = 0; i < totalGenes.Count; i++) { if (totalGenes[i].GetPriority() > geneStrength) { geneStrength = totalGenes[i].GetPriority(); selectedGene = i; } } } dominateGene = totalGenes[selectedGene]; }
public void ModifyGenes(Gene Modifier) { if (totalGenes.Count == 1) { bool canCombine = false; Gene possibleCombination = null; (canCombine, possibleCombination) = GeneFunctionManager.FindCombineGenes(totalGenes[0], Modifier); if (canCombine) { totalGenes[0] = possibleCombination; } else { totalGenes.Add(Modifier); } } if (totalGenes.Count == 0) { totalGenes.Add(Modifier); } }
public void ModifyGenes(Gene Modifier, SpriteRenderer primary, SpriteRenderer secondary) { if (totalGenes.Count == 1) { bool canCombine = false; Gene possibleCombination = null; (canCombine, possibleCombination) = GeneFunctionManager.FindCombineGenes(totalGenes[0], Modifier); if (canCombine) { totalGenes[0] = possibleCombination; primary.sprite = totalGenes[0].GetFlowerSprite(); } else { totalGenes.Add(Modifier); secondary.sprite = totalGenes[1].GetFlowerSprite(); } } if (totalGenes.Count == 0) { totalGenes.Add(Modifier); } }
public abstract void Effect(Gene geneModifier);
public override void Effect(Gene geneModifier) { }