本文整理汇总了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++;
}
}
}
}
}