public void ModifyGenes(Gene Modifier, Plant.StageOfGrowth growth) { if (growth == Plant.StageOfGrowth.seedling) { 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); } CalculateGrowthTime(); CalculateTotalFrequency(); CalculateTotalWaterNeed(); CalculatingDominateGene(); } }
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); } }