Beispiel #1
0
        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;
                }
            }
        }
Beispiel #2
0
 public Adult(Juvenile juvenile) : base(juvenile)
 {
     birthUT     = juvenile.Birth();
     adulthoodUT = juvenile.Maturation();
     kerbal      = null;                 // not yet recruited
     subp        = UnityEngine.Random.Range(0, 1f);
     initialize();
 }
Beispiel #3
0
        public void Mature(Embryo embryo)
        {
            embryos.Remove(embryo.id);
            var juvenile = new Juvenile(embryo);

            juveniles[juvenile.id] = juvenile;
            var mother = females[juvenile.mother_id];

            juvenile.SetLocation(mother.location);
        }
Beispiel #4
0
 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;
     }
 }
Beispiel #5
0
 public Male(Juvenile juvenile) : base(juvenile)
 {
     initialize();
 }
Beispiel #6
0
 public Female(Juvenile juvenile) : base(juvenile)
 {
     initialize();
     fsm.StartFSM("Fertile");
 }