private void ReGenerateADN(LifeFormTypes aLifeFormType, DNASequence aDna) { if (dna != null) { dna = new DNASequence(dna); } else { dna = new DNASequence(aLifeFormType); } }
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 } }
public DNASequence(LifeFormTypes aLifeFormType) { LfType = aLifeFormType; LoadSkillsFromDNA(null); }
public EnvironmentLifeForm(LifeForm aMaster, LifeFormTypes aLifeFormType, DNASequence aDna) : base(aMaster, aLifeFormType, aDna) { BeginMainTask(); }
public EnvironmentLifeForm(LifeForm aMaster, LifeFormTypes aLifeFormType) : base(aMaster, aLifeFormType) { BeginMainTask(); }
public LifeForm(LifeForm aMaster, LifeFormTypes aLifeFormType, DNASequence aDna) { _Master = aMaster; LfType = aLifeFormType; ReGenerateADN(aLifeFormType, aDna); }
public LifeForm(LifeForm aMaster, LifeFormTypes aLifeFormType) { _Master = aMaster; LfType = aLifeFormType; ReGenerateADN(aLifeFormType, null); }
public FoodLifeForm(LifeForm aMaster, LifeFormTypes aLifeFormType, DNASequence aDna) : base(aMaster, aLifeFormType, aDna) { FoodValue = GetAttribute(SkillTypes.FoodProductionRate); BeginMainTask(); }