本文整理汇总了C#中Sim.RemoveExitReason方法的典型用法代码示例。如果您正苦于以下问题:C# Sim.RemoveExitReason方法的具体用法?C# Sim.RemoveExitReason怎么用?C# Sim.RemoveExitReason使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sim
的用法示例。
在下文中一共展示了Sim.RemoveExitReason方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RouteNearEntranceAndEnterRabbitHole
//.........这里部分代码省略.........
item.SetRouteMetaType(routeMetaType);
foreach (Slot slot2 in Target.RabbitHoleProxy.EnterSlots)
{
item.AddObjectToIgnoreForRoute(Target.RabbitHoleProxy.SlotToSlotInfo[slot2].Footprint.ObjectId);
}
foreach (Slot slot3 in Target.RabbitHoleProxy.MountedEnterSlots)
{
item.AddObjectToIgnoreForRoute(Target.RabbitHoleProxy.SlotToSlotInfo[slot3].Footprint.ObjectId);
}
item.PlanToSlot(Target.RabbitHoleProxy, (a.IsInRidingPosture ? Target.RabbitHoleProxy.MountedEnterSlots : Target.RabbitHoleProxy.EnterSlots).ToArray());
if (!item.PlanResult.Succeeded())
{
item.DoRouteFail = playRouteFailure;
if (a.IsInRidingPosture)
{
return parent.DoRoute(item);
}
return a.DoRoute(item);
}
slotToUse = (Slot)item.PlanResult.mDestSlotNameHash;
// Slot Reassignment
if ((Target.RabbitHoleProxy.EnterSlots.Count > 1) && (Target.RabbitHoleProxy.EnterSlots.Count <= 5))
{
slotToUse = ReassignSlot(Target.RabbitHoleProxy.EnterSlots.Count);
}
List<Sim> followers = (inst == null) ? null : inst.SimFollowers;
if ((!flag && (followers != null)) && ((followers.Count > 1) || ((followers.Count == 1) && (followers[0].Posture.Container != a))))
{
//if (RouteOutside(a, followers, this.RabbitHoleProxy.EnterSlots[0x0], false, true, true, false))
if (Target.RouteOutside(a, followers, Target.RabbitHoleProxy.EnterSlots[0], false, true, true, false))
{
flag = true;
flag2 = true;
}
}
else
{
//flag2 = RouteOutside(a, followers, none, false, true, false, false);
flag2 = Target.RouteOutside(a, followers, slotToUse, false, true, false, false);
}
if (!flag2 && (kRouteAttemptsToEnterRabbitHole > 0))
{
if (IntroTutorial.TutorialSim == a)
{
break;
}
a.RemoveExitReason(ExitReason.RouteFailed);
if (a.HasExitReason(~(ExitReason.Replan | ExitReason.MidRoutePushRequested | ExitReason.ObjectStateChanged | ExitReason.PlayIdle | ExitReason.MaxSkillPointsReached)))
{
break;
}
a.LoopIdle();
Simulator.Sleep((uint)SimClock.ConvertToTicks(RandomUtil.GetFloat(RabbitHole.kMinSimMinutesToSleepOnFailedRouteAttempt, RabbitHole.kMaxSimMinutesToSleepOnFailedRouteAttempt), TimeUnit.Minutes));
}
continue;
}
finally
{
Target.RabbitHoleProxy.ActiveEntryRoutes.Remove(item);
}
}
item = null;
if (((a.ExitReason & ExitReason.HigherPriorityNext) == ExitReason.None) && ((a.ExitReason & ExitReason.UserCanceled) == ExitReason.None))
{
if (flag2)
{
RabbitHole.NumSuccess++;
}
else
{
RabbitHole.NumFail++;
}
}
if (!flag2)
{
return flag2;
}
if ((beforeEntering != null) && !beforeEntering())
{
List<Sim> simFollowers = null;
if (inst != null)
{
simFollowers = inst.SimFollowers;
}
//RouteOutside(a, simFollowers, RandomUtil.GetRandomObjectFromList<Slot>(a.IsInRidingPosture ? this.RabbitHoleProxy.MountedEnterSlots : this.RabbitHoleProxy.EnterSlots), false, false, true, true);
Target.RouteOutside(a, simFollowers, RandomUtil.GetRandomObjectFromList<Slot>(a.IsInRidingPosture ? Target.RabbitHoleProxy.MountedEnterSlots : Target.RabbitHoleProxy.EnterSlots), false, false, true, true);
return false;
}
LeadingHorsePosture posture2 = a.Posture as LeadingHorsePosture;
if (posture2 != null)
{
Sim container = posture2.Container as Sim;
LeadingHorsePosture.ReleaseHorseFromLeadingPosture(a, container, false);
Target.AnimateEnterRabbitHole(a, slotToUse, true, routeMetaType);
Target.AnimateEnterRabbitHole(container, slotToUse, true, routeMetaType);
return flag2;
}
return Target.AnimateEnterRabbitHole(a, slotToUse, true, routeMetaType);
}