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


C# Sim.CanBeInSameGroupTalkAsMe方法代码示例

本文整理汇总了C#中Sim.CanBeInSameGroupTalkAsMe方法的典型用法代码示例。如果您正苦于以下问题:C# Sim.CanBeInSameGroupTalkAsMe方法的具体用法?C# Sim.CanBeInSameGroupTalkAsMe怎么用?C# Sim.CanBeInSameGroupTalkAsMe使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Sim的用法示例。


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

示例1: AddSocials

        public static void AddSocials(string name, SocialComponent ths, CommodityTypes commodity, Sim actor, Sim target, List<SocialInteractionCandidate> socials, bool isAutonomous, int maxNumSocials, List<InteractionObjectPair> results, string[] inlineParentMenu, TraitNames trait)
        {
            sMsg += Common.NewLine + "AddSocials " + name + " " + commodity + " " + socials.Count;

            int num = 0x0;
            InteractionPriority priority = new InteractionPriority(isAutonomous ? InteractionPriorityLevel.Autonomous : InteractionPriorityLevel.UserDirected);
            GreyedOutTooltipCallback greyedOutTooltipCallback = null;
            foreach (SocialInteractionCandidate candidate in socials)
            {
                string[] strArray = inlineParentMenu;
                bool flag = true;
                if (num >= maxNumSocials)
                {
                    break;
                }

                sMsg += Common.NewLine + " Testing " + candidate.Name;

                ActiveTopic topic = candidate.Topic;
                if (topic != null)
                {
                    ActiveTopicData data = topic.Data;
                    if (data.HasPieMenuOverride())
                    {
                        flag = false;
                        strArray = new string[] { data.GetText(actor, new object[0x0]) };
                    }
                }
                ActionData data2 = ActionData.Get(candidate.Name);
                if (data2.AppearsOnTopLevel)
                {
                    strArray = new string[0x0];
                }
                if (!ths.DoesSocialAppear(candidate.Name, results, strArray))
                {
                    InteractionObjectPair iop = null;
                    if (((data2.IntendedCommodityString == CommodityTypes.Friendly) && ((actor.Posture is ISeatedSocialPosture) || (target.Posture is ISeatedSocialPosture))) && data2.AllowCarryChild)
                    {
                        InteractionDefinition interaction = new SeatedSocialInteractionA.SeatedDefinition(candidate.Name, strArray, candidate.Topic, false, trait, false);
                        iop = new InteractionObjectPair(interaction, target);
                        InteractionInstanceParameters parameters = new InteractionInstanceParameters(iop, actor, priority, isAutonomous, true);
                        if (!IUtil.IsPass(interaction.Test(ref parameters, ref greyedOutTooltipCallback)))
                        {
                            iop = null;
                        }
                        if (((candidate.Name == "Chat") && !actor.CanBeInSameGroupTalkAsMe(target)) && (actor.Posture is ISeatedSocialPosture))
                        {
                            string[] strArray2 = new string[0x0];
                            if (!ths.DoesSocialAppear(candidate.Name, results, strArray2))
                            {
                                interaction = new SeatedSocialInteractionA.SeatedDefinition(candidate.Name, strArray2, candidate.Topic, false, trait, true);
                                InteractionObjectPair pair2 = new InteractionObjectPair(interaction, target);
                                parameters = new InteractionInstanceParameters(pair2, actor, priority, isAutonomous, true);
                                if (IUtil.IsPass(interaction.Test(ref parameters, ref greyedOutTooltipCallback)))
                                {
                                    results.Add(pair2);
                                }
                            }
                        }
                    }
                    if (iop == null)
                    {
                        iop = new InteractionObjectPair(new SocialInteractionA.Definition(candidate.Name, strArray, candidate.Topic, false, trait), target);
                    }
                    InteractionInstanceParameters parameters2 = new InteractionInstanceParameters(iop, actor, priority, isAutonomous, true);

                    InteractionTestResult result = iop.InteractionDefinition.Test(ref parameters2, ref greyedOutTooltipCallback);

                    sMsg += Common.NewLine + "  " + candidate.Name + " = " + result;

                    if ((IUtil.IsPass(result) || (greyedOutTooltipCallback != null)) || Sims3.Gameplay.UI.PieMenu.PieMenuShowFailureReason)
                    {
                        results.Add(iop);
                        if (flag)
                        {
                            num++;
                        }
                    }
                }
            }
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:81,代码来源:TestPopupMenu.cs


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