示例#1
0
        public void Divorce()
        {
            SocialSystem socialSystem = CivilManager.GetSystem <SocialSystem>();

            var marriageRecord = socialSystem.MarriageRecords.GetRecord(this);

            if (marriageRecord != null)
            {
                socialSystem.DivorceRecords.CreateRecord(marriageRecord);
            }
            else
            {
                // TODO : the man is not married or spouse is died
            }
        }
示例#2
0
        public void ProduceBaby()
        {
            SocialSystem socialSystem = CivilManager.GetSystem <SocialSystem>();

            var marriageRecord = socialSystem.MarriageRecords.GetRecord(this);
            var dieRecord      = socialSystem.DieRecords.GetRecord(this);

            if (marriageRecord == null || marriageRecord.RecordState == RecordState.Obselete ||
                dieRecord != null)
            {
                return;
            }

            HumanSex childSex  = RandomSelector.GetRandomEnumValue <HumanSex>();
            string   childName = RandomSelector.GetRandomName(childSex);

            socialSystem.HumanRecords.CreateRecord(marriageRecord, childName, childSex);
        }
 public HumanRecordList(CivilizationManager civilManager)
     : base(civilManager)
 {
     SocialSystem = CivilManager.GetSystem <SocialSystem>();
 }