Example #1
0
 private void ReGenerateADN(LifeFormTypes aLifeFormType, DNASequence aDna)
 {
     if (dna != null)
     {
         dna = new DNASequence(dna);
     }
     else
     {
         dna = new DNASequence(aLifeFormType);
     }
 }
Example #2
0
 private void LoadSkillsFromDNA(DNASequence aDna)
 {
     if (aDna != null)
     {
         int x = 0;
         foreach (Skill sk in aDna.SkillList.Values)
         {
             SkillList.Add(sk.Type, new Skill(sk.Type, sk.Value, sk.Priority, x++));
         }
         LfType = (LifeFormTypes)GetAttribute(SkillTypes.LifeFormType);
     }
     else
     {
         //We must stablish some pattern configs
     }
 }
Example #3
0
 public DNASequence(LifeFormTypes aLifeFormType)
 {
     LfType = aLifeFormType;
     LoadSkillsFromDNA(null);
 }
Example #4
0
 public EnvironmentLifeForm(LifeForm aMaster, LifeFormTypes aLifeFormType, DNASequence aDna)
     : base(aMaster, aLifeFormType, aDna)
 {
     BeginMainTask();
 }
Example #5
0
 public EnvironmentLifeForm(LifeForm aMaster, LifeFormTypes aLifeFormType)
     : base(aMaster, aLifeFormType)
 {
     BeginMainTask();
 }
Example #6
0
 public LifeForm(LifeForm aMaster, LifeFormTypes aLifeFormType, DNASequence aDna)
 {
     _Master = aMaster;
     LfType  = aLifeFormType;
     ReGenerateADN(aLifeFormType, aDna);
 }
Example #7
0
 public LifeForm(LifeForm aMaster, LifeFormTypes aLifeFormType)
 {
     _Master = aMaster;
     LfType  = aLifeFormType;
     ReGenerateADN(aLifeFormType, null);
 }
Example #8
0
 public EnvironmentLifeForm(LifeForm aMaster, LifeFormTypes aLifeFormType, DNASequence aDna)
     : base(aMaster, aLifeFormType, aDna)
 {
     BeginMainTask();
 }
Example #9
0
 public EnvironmentLifeForm(LifeForm aMaster, LifeFormTypes aLifeFormType)
     : base(aMaster, aLifeFormType)
 {
     BeginMainTask();
 }
Example #10
0
 public FoodLifeForm(LifeForm aMaster, LifeFormTypes aLifeFormType, DNASequence aDna)
     : base(aMaster, aLifeFormType, aDna)
 {
     FoodValue = GetAttribute(SkillTypes.FoodProductionRate);
     BeginMainTask();
 }
Example #11
0
 public FoodLifeForm(LifeForm aMaster, LifeFormTypes aLifeFormType, DNASequence aDna)
     : base(aMaster, aLifeFormType, aDna)
 {
     FoodValue = GetAttribute(SkillTypes.FoodProductionRate);
     BeginMainTask();
 }