Exemplo n.º 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
            }
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
 public HumanRecordList(CivilizationManager civilManager)
     : base(civilManager)
 {
     SocialSystem = CivilManager.GetSystem <SocialSystem>();
 }