示例#1
0
 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();
     }
 }
示例#2
0
 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);
     }
 }
示例#3
0
 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);
     }
 }