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


C# Route.IsPointObstructedBySim方法代码示例

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


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

示例1: DebugMsg


//.........这里部分代码省略.........
                                try
                                {
                                    MidRouteBePushed(r.ExecutionFromNonSimTaskIsSafe);
                                }
                                catch (ResetException)
                                {
                                    throw;
                                }
                                catch (Exception e)
                                {
                                    Common.Exception(routeSim, e);
                                }

                                r.Replan();
                            }
                            else
                            {
                                mbPushRequested = false;
                            }

                            continue;
                        }

                        StartPushImmunity(OnRouteStartedImmuneToPushesDuration);
                        flag = DoSingleRouteEx(r, true);
                        flag &= r.PlanResult.Succeeded();
                        if (mbPushRequested)
                        {
                            continue;
                        }

                        if (r.GetOption(Route.RouteOption.CheckForFootprintsNearGoals))
                        {
                            ObjectGuid guid = r.IsPointObstructedBySim(mOwnerSim.PositionOnFloor);
                            if (guid != ObjectGuid.InvalidObjectGuid)
                            {
                                ObjectGuid runningTargetId = ObjectGuid.InvalidObjectGuid;
                                if (((mOwnerSim.InteractionQueue != null) && (mOwnerSim.InteractionQueue.RunningInteraction != null)) && (mOwnerSim.InteractionQueue.RunningInteraction.Target != null))
                                {
                                    runningTargetId = mOwnerSim.InteractionQueue.RunningInteraction.Target.ObjectId;
                                }

                                if ((guid != runningTargetId) && !PushSims(mOwnerSim.PositionOnFloor, 0.5f, false))
                                {
                                    bool option = r.GetOption(Route.RouteOption.BlockedByPeople);
                                    r.SetOption(Route.RouteOption.BlockedByPeople, true);
                                    r.Replan();
                                    r.SetOption(Route.RouteOption.BlockedByPeople, option);
                                    if (r.PlanResult.Succeeded() && (r.IsPointObstructedBySim(mOwnerSim.PositionOnFloor) == ObjectGuid.InvalidObjectGuid))
                                    {
                                        continue;
                                    }

                                    StartPushImmunity(OnEmergencyGetAwayRouteStartedImmuneToPushesDuration);
                                    Route route = PlanRouteForPush(mOwnerSim, null, PushSimsAwayDistanceMin, PushSimsAwayDistanceMax);
                                    DoSingleRouteEx(route, false);
                                    flag = false;
                                    if (r.DoRouteFail)
                                    {
                                        Sim sim = guid.ObjectFromId<Sim>();
                                        PlayRouteFailureIfAppropriate(sim);
                                    }

                                    RouteFailureTurnJigBlocker = ObjectGuid.InvalidObjectGuid;
                                    HasRouteFailureFromTurnJig = false;
开发者ID:GnatGoSplat,项目名称:NRaas,代码行数:66,代码来源:SimRoutingComponentEx.cs


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