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


C# Route.SetValidRooms方法代码示例

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


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

示例1: SetRouteOptions


//.........这里部分代码省略.........
                    r.SetOption2(Route.RouteOption2.DestinationMustBeOnLand, true);
                }

                if (ths.SimSatisfiesSpecialConditions())
                {
                    r.SetOption(Route.RouteOption.PassThroughObjects, true);
                    r.SetOption(Route.RouteOption.PassThroughWalls, true);
                }

                if (ths.OwnerSim.HasGhostBuff && !flag)
                {
                    r.SetOption(Route.RouteOption.RouteAsGhost, true);
                }

                if ((GameUtils.IsInstalled(ProductVersion.EP4) && (ths.OwnerSim.CarryingChildPosture != null)) && (Stroller.GetStroller(ths.OwnerSim, ths.OwnerSim.LotCurrent) != null))
                {
                    r.SetOption(Route.RouteOption.PlanUsingStroller, true);
                }

                if (ths.OwnerSim.IsHuman)
                {
                    SwimmingInPool pool = previousPosture as SwimmingInPool;
                    if (pool != null)
                    {
                        if (pool.ContainerIsOcean)
                        {
                            r.SetOption(Route.RouteOption.EnableWaterPlanning, true);
                        }
                    }
                    else
                    {
                        Ocean.PondAndOceanRoutingPosture posture2 = previousPosture as Ocean.PondAndOceanRoutingPosture;
                        if ((posture2 != null) && (posture2.WalkStyleToUse == Sim.WalkStyle.Wade))
                        {
                            r.SetOption(Route.RouteOption.EnableWaterPlanning, true);
                        }
                    }
                }

                if (GameUtils.IsInstalled(ProductVersion.EP8))
                {
                    // Custom
                    if (SimEx.GetOwnedAndUsableVehicle(ths.OwnerSim, ths.OwnerSim.LotHome, false, false, false, true) is CarUFO)
                    //if (OwnerSim.GetOwnedAndUsableVehicle(OwnerSim.LotHome, false, false, false, true) is CarUFO)
                    {
                        r.SetOption(Route.RouteOption.EnableUFOPlanning, true);
                    }
                    if ((ths.OwnerSim.IsHuman && ths.OwnerSim.SimDescription.ChildOrAbove) && PondManager.ArePondsFrozen())
                    {
                        bool flag6 = true;
                        while (previousPosture != null)
                        {
                            if (previousPosture.Satisfaction(CommodityKind.Standing, null) <= 0f)
                            {
                                flag6 = false;
                                break;
                            }
                            previousPosture = previousPosture.PreviousPosture;
                        }
                        if (flag6)
                        {
                            r.SetOption(Route.RouteOption.EnablePondPlanning, true);
                        }
                    }
                }

                r.ExitReasonsInterrupt = unchecked((int)0xffa9bfff);
                if ((0x0 != (ageGenderFlags & 0x3)) && !ths.OwnerSim.LotCurrent.IsWorldLot)
                {
                    r.SetValidRooms(ths.OwnerSim.LotCurrent.LotId, null);
                }

                if ((ths.OwnerSim.IsHorse && ths.OwnerSim.SimDescription.AdultOrAbove) && !ths.OwnerSim.SimDescription.IsGhost)
                {
                    r.SetOption(Route.RouteOption.RouteAsLargeAnimal, true);
                }

                if (((ths.OwnerSim.IsHorse || ths.OwnerSim.IsDeer) || (ths.OwnerSim.IsFullSizeDog && ths.OwnerSim.SimDescription.AdultOrAbove)) && !ths.OwnerSim.SimDescription.IsGhost)
                {
                    r.SetOption(Route.RouteOption.OffsetDestinationForLongAnimals, true);
                }

                if (ths.OwnerSim.IsHorse && ths.OwnerSim.IsInBeingRiddenPosture)
                {
                    r.SetOption(Route.RouteOption.RouteWhileMounted, true);
                }

                if (previousPosture is LeadingHorsePosture)
                {
                    r.SetOption(Route.RouteOption.EnablePlanningAsCar, false);
                    r.SetOption(Route.RouteOption.RouteAsLargeAnimal, true);
                    r.SetOption(Route.RouteOption.RouteAsSimLeadingHorse, true);
                }

                if (ths.OwnerSim.IsPet && !ths.OwnerSim.IsInBeingRiddenPosture)
                {
                    r.SetOption(Route.RouteOption.IgnoreSidewalkAndLotRestrictions, true);
                }
            }
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:101,代码来源:SimRoutingComponentEx.cs


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