示例#1
0
文件: Person.cs 项目: RtHiaHB/PopSim2
 public Person()
 {
     myName = new Name(6);
     myEyes = NewEyes();
     myHair = NewHair();
     itsGender = NewGender();
     mySize = NewSize();
     myPrefs = new Preferences();
     myThoughtBubble = NewThoughts();
     myAge = 18.0;
     MomsName = new Name(3);
     DadsName = new Name(3);
     myChildrensNames = new List<Name>();
 }
示例#2
0
文件: Person.cs 项目: RtHiaHB/PopSim2
 public Person(Person mom, Person dad)
 {
     myName = new Name(mom.Name, dad.Name);
     myEyes = NewEyes(mom.Eyes, dad.Eyes);
     myHair = NewHair(mom.Hair, dad.Hair);
     itsGender = NewGender();
     mySize = NewSize(mom.Size, dad.Size);
     if (itsGender == Gender.Male)
     {
         myPrefs = new Preferences(mom);
     }
     else
     {
         myPrefs = new Preferences(dad);
     }
     myAge = 0.0;
     MomsName = mom.Name;
     DadsName = dad.Name;
     myChildrensNames = new List<PopSim2.Name>();
     mom.NewChild(this);
     dad.NewChild(this);
     myThoughtBubble = NewThoughts(mom, dad);
 }