本文整理汇总了C#中Lot.IsHouseboatLot方法的典型用法代码示例。如果您正苦于以下问题:C# Lot.IsHouseboatLot方法的具体用法?C# Lot.IsHouseboatLot怎么用?C# Lot.IsHouseboatLot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lot
的用法示例。
在下文中一共展示了Lot.IsHouseboatLot方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsPointInLotSafelyRoutable
public static bool IsPointInLotSafelyRoutable(Sim ths, Lot lot, Vector3 pos)
{
if ((lot == null) || (lot.Corners == null))
{
return false;
}
if (pos.IsSimilarTo(Vector3.Zero) || pos.IsSimilarTo(Vector3.OutOfWorld))
{
return false;
}
LotLocation invalid = LotLocation.Invalid;
ulong lotLocation = World.GetLotLocation(pos, ref invalid);
if (!lot.IsWorldLot && (lotLocation != lot.LotId))
{
return false;
}
TerrainType terrainType = World.GetTerrainType(pos);
switch (terrainType)
{
case TerrainType.WorldSea:
case TerrainType.WorldPond:
case TerrainType.LotPool:
case TerrainType.LotPond:
return false;
}
if (!lot.IsWorldLot)
{
// Custom
Route route = SimRoutingComponentEx.CreateRouteAsAdult(ths.SimRoutingComponent);
route.SetOption(Route.RouteOption.EnableWaterPlanning, ths.IsHuman);
float num2 = 1f;
if (lot.IsHouseboatLot())
{
num2++;
}
for (int i = 0x0; i < 0x4; i++)
{
RadialRangeDestination destination = new RadialRangeDestination();
destination.mCenterPoint = lot.Corners[i];
destination.mfMinRadius = 0f;
destination.mfMaxRadius = num2;
route.AddDestination(destination);
destination = new RadialRangeDestination();
int num4 = (i + 0x1) % 0x4;
destination.mCenterPoint = (Vector3)((lot.Corners[i] + lot.Corners[num4]) * 0.5f);
destination.mfMinRadius = 0f;
destination.mfMaxRadius = num2;
route.AddDestination(destination);
}
route.PlanFromPoint(pos);
if (route.PlanResult.mType != RoutePlanResultType.Succeeded)
{
return false;
}
}
return true;
}