public Embryo(Female mother, Male father) : base(mother, father) { subp = UnityEngine.Random.Range(0, 1f); conceived = Planetarium.GetUniversalTime(); birth = CalcBirth(); SetLocation(ProgenyScenario.current.GetLocation("Womb")); }
void LoadZygotes(ConfigNode config) { var zygote_list = config.nodes; foreach (ConfigNode z in zygote_list) { switch (z.name) { case "embryo": var embryo = new Embryo(z); embryos[embryo.id] = embryo; break; case "juvenile": var juvenile = new Juvenile(z); juveniles[juvenile.id] = juvenile; break; case "female": var female = new Female(z); females[female.id] = female; break; case "male": var male = new Male(z); males[male.id] = male; break; } } }
public Zygote(Female mother, Male father) { mother_id = mother.id; father_id = father.id; id = ProgenyScenario.current.NextZygoteID(); genes = Genome.Combine(mother.genes, father.genes); init(); }
public void Mature(Juvenile juvenile) { juveniles.Remove(juvenile.id); if (juvenile.isFemale) { var female = new Female(juvenile); females[female.id] = female; } else { var male = new Male(juvenile); males[male.id] = male; } }
public void AddKerbal(KerbalExt ext) { if (ProgenyScenario.current == null) { Debug.LogFormat("[ProgenyTracker] AddKerbal: delaying add"); AddLoadingKerbal(ext); return; } Debug.LogFormat("[ProgenyTracker] AddKerbal: adding kerbal"); Zygote kerbal; if (ext.kerbal.gender == ProtoCrewMember.Gender.Female) { kerbal = new Female(ext.kerbal); } else { kerbal = new Male(ext.kerbal); } kerbal_ids[ext.kerbal.name] = kerbal.id; ProgenyScenario.current.AddKerbal(kerbal); ext[name] = kerbal.id; CheckLocation(ext.kerbal); }
public FemaleFSM(Female female) { this.female = female; CreateStateMachine(); }