当前位置: 首页>>代码示例>>C#>>正文


C# IMiniSimDescription类代码示例

本文整理汇总了C#中IMiniSimDescription的典型用法代码示例。如果您正苦于以下问题:C# IMiniSimDescription类的具体用法?C# IMiniSimDescription怎么用?C# IMiniSimDescription使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IMiniSimDescription类属于命名空间,在下文中一共展示了IMiniSimDescription类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Run

        protected bool Run(IMiniSimDescription a, IMiniSimDescription b)
        {
            try
            {
                if (b is SimDescription)
                {
                    SimDescription sim = b as SimDescription;

                    if (!Test(a, sim)) return true;

                    return PrivateRun(a, sim);
                }
                else
                {
                    MiniSimDescription sim = b as MiniSimDescription;

                    if (!Test(a, sim)) return true;

                    return PrivateRun(a, sim);
                }
            }
            catch (Exception e)
            {
                Common.Exception(a, b as SimDescription, e);
                return false;
            }
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:27,代码来源:DualSimFromList.cs

示例2: IsValidRelationship

        private static bool IsValidRelationship(IMiniSimDescription sim1, IMiniSimDescription sim2, CASFamilyScreen.RelationshipType relationship)
        {
            switch (relationship)
            {
                case CASFamilyScreen.RelationshipType.Roommate:
                    return true;

                case CASFamilyScreen.RelationshipType.Spouse:
                    if (!sim1.TeenOrAbove) return false;

                    if (!sim2.TeenOrAbove) return false;

                    if (CASFamilyScreenEx.kAllowAdultTeen) return true;

                    return (sim1.Teen == sim2.Teen);
                case CASFamilyScreen.RelationshipType.Parent:
                    if (sim2.Age > sim1.Age) return false;

                    return sim1.TeenOrAbove;
                case CASFamilyScreen.RelationshipType.Child:
                    if (sim1.Age > sim2.Age) return false;

                    return sim2.TeenOrAbove;
                case CASFamilyScreen.RelationshipType.Sibling:
                    return true;
            }
            return false;
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:28,代码来源:CASFamilyScreenEx.cs

示例3: Perform

 public static void Perform(IMiniSimDescription me)
 {
     if (!Responder.Instance.IsGameStatePending || !Responder.Instance.IsGameStateShuttingDown)
     {
         Dialogs.FamilyTreeDialog.Show(me);
     }
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:7,代码来源:FamilyTree.cs

示例4: PrivateRun

        protected override bool PrivateRun(IMiniSimDescription a, SimDescription b)
        {
            if (!Fixup(a as SimDescription)) return false;
            if (!Fixup(b)) return false;

            return Run(a.CASGenealogy as Genealogy, b.Genealogy);
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:7,代码来源:GenealogyOption.cs

示例5: GetDetails

        public string GetDetails(IMiniSimDescription miniSim)
        {
            SimDescription me = miniSim as SimDescription;
            if (me == null) return null;

            string msg = PersonalStatus.GetHeader(me) + Common.NewLine;

            List<string> skills = new List<string>();

            foreach (Skill skill in me.SkillManager.List)
            {
                if (skill.SkillLevel <= 0) continue;

                skills.Add(Common.Localize("SkillsStatus:Element", me.IsFemale, new object[] { skill.Name, skill.SkillLevel }));
            }

            if (skills.Count == 0)
            {
                msg += Common.Localize("SkillsStatus:NoSkill");
            }
            else
            {
                skills.Sort();

                foreach (string skill in skills)
                {
                    msg += skill;
                }
            }

            return msg;
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:32,代码来源:SkillsStatus.cs

示例6: FamilyTreeDialog

        public FamilyTreeDialog(IMiniSimDescription sim)
            : base(sConstructorStub)
        {
            mSimTreeInfos.Clear();
            mSimTreeInfoEx.Clear();

            RefreshTree(sim);
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:8,代码来源:FamilyTreeDialog.cs

示例7: CleanseGenealogy

 public static void CleanseGenealogy(IMiniSimDescription me)
 {
     Genealogy genealogy = me.CASGenealogy as Genealogy;
     if (genealogy != null)
     {
         genealogy.ClearAllGenealogyInformation();
     }
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:8,代码来源:Annihilation.cs

示例8: CanTextWithEachOther

 public override bool CanTextWithEachOther(Sim actor, IMiniSimDescription other, bool foreignText)
 {                
     if (!Phone.SendTextBase.SimCanTextWithActor(actor, other, foreignText))
     {                    
         return false;
     }
     return SendWooHootyTextEx.SimCanTextWithActorEx(actor, other, foreignText);
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:8,代码来源:SendWooHootyTextFromRelationPanelEx.cs

示例9: Allow

        protected override bool Allow(SimDescription me, IMiniSimDescription actor)
        {
            if (!me.TeenOrAbove) return false;

            if (me.mGenderPreferenceMale <= 0) return false;

            return true;
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:8,代码来源:PreferenceMale.cs

示例10: GetDetails

        public string GetDetails(IMiniSimDescription me)
        {
            string msg = null;

            try
            {
                msg = PersonalStatus.GetHeader(me);

                SimDescription simDesc = me as SimDescription;

                foreach (SimPersonality personality in SP::NRaas.StoryProgression.Main.Personalities.GetClanMembership(simDesc, true))
                {
                    msg += Common.NewLine + personality.GetLocalizedName();

                    if (personality.Me != null)
                    {
                        msg += Common.NewLine + Common.Localize("Personalities:Leader", personality.IsFemaleLocalization(), new object[] { personality.Me });
                    }

                    int memberCount = personality.GetClanMembers(false).Count;
                    if (memberCount > 0)
                    {
                        msg += Common.Localize("Personalities:Members", personality.IsFemaleLocalization(), new object[] { memberCount });
                    }

                    Dictionary<SimDescription, bool> opponents = new Dictionary<SimDescription, bool>();

                    foreach (SimPersonality opponent in SP::NRaas.StoryProgression.Main.Personalities.AllPersonalities)
                    {
                        if (opponent.IsOpposing(personality))
                        {
                            int count = 0;

                            foreach (SimDescription sim in opponent.GetClanMembers(true))
                            {
                                if (opponents.ContainsKey(sim)) continue;

                                opponents.Add(sim, true);
                                count++;
                            }

                            if (count > 0)
                            {
                                msg += Common.NewLine + Common.Localize(GetTitlePrefix() + ":Opposing", opponent.IsFemaleLocalization(), new object[] { opponent.GetLocalizedName(), count });
                            }
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Common.Exception(me.FullName, e);

                msg += Common.NewLine + "END OF LINE";
            }

            return msg;
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:58,代码来源:PersonalityStatus.cs

示例11: Allow

        protected override bool Allow(MiniSimDescription me, IMiniSimDescription actor)
        {
            Genealogy genealogy = actor.CASGenealogy as Genealogy;
            if (genealogy == null) return false;

            if (!me.Genealogy.IsBloodRelated(genealogy)) return false;

            return true;
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:9,代码来源:RelationBlood.cs

示例12: Allow

        protected override bool Allow(MiniSimDescription me, IMiniSimDescription actor)
        {
            Genealogy genealogy = actor.CASGenealogy as Genealogy;
            if (genealogy == null) return false;

            if (me.Genealogy.IsSufficientlyRelatedToRuleOutRomance(genealogy)) return false;

            return true;
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:9,代码来源:RelationNone.cs

示例13: Allow

        protected override bool Allow(SimDescription me, IMiniSimDescription actor)
        {
            SimDescription active = null;
            if (Sim.ActiveActor != null)
            {
                active = Sim.ActiveActor.SimDescription;
            }

            return (me == active);
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:10,代码来源:ActiveSim.cs

示例14: AllowSpecies

 protected override bool AllowSpecies(IMiniSimDescription me)
 {
     if (Common.AssemblyCheck.IsInstalled("NRaasWoohooer"))
     {
         return true;
     }
     else
     {
         return me.IsHuman;
     }
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:11,代码来源:BabyMultiple.cs

示例15: Update

        public override SimSelection.UpdateResult Update(IMiniSimDescription actor, IEnumerable<SimSelection.ICriteria> criteria, List<IMiniSimDescription> allSims, bool secondStage)
        {
            if (secondStage) return SimSelection.UpdateResult.Success;

            mPrefix = StringInputDialog.Show(Name, Common.Localize(GetTitlePrefix() + ":Prompt", actor.IsFemale), "");
            if (string.IsNullOrEmpty(mPrefix)) return SimSelection.UpdateResult.Failure;

            mPrefix = mPrefix.Trim().ToLower();

            return base.Update(actor, criteria, allSims, secondStage);
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:11,代码来源:FirstName.cs


注:本文中的IMiniSimDescription类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。