本文整理汇总了C#中NetInfo.Setup32m5mSWMesh方法的典型用法代码示例。如果您正苦于以下问题:C# NetInfo.Setup32m5mSWMesh方法的具体用法?C# NetInfo.Setup32m5mSWMesh怎么用?C# NetInfo.Setup32m5mSWMesh使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NetInfo
的用法示例。
在下文中一共展示了NetInfo.Setup32m5mSWMesh方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BuildUp
public void BuildUp(NetInfo info, NetInfoVersion version)
{
///////////////////////////
// Template //
///////////////////////////
var roadInfo = Prefabs.Find<NetInfo>(NetInfos.Vanilla.ROAD_6L);
var roadTunnelInfo = Prefabs.Find<NetInfo>(NetInfos.Vanilla.ROAD_6L_TUNNEL);
var bridgeInfo = Prefabs.Find<NetInfo>(NetInfos.Vanilla.ROAD_4L_BRIDGE).Clone("temp");
///////////////////////////
// 3DModeling //
///////////////////////////
info.Setup32m5mSWMesh(version);
///////////////////////////
// Texturing //
///////////////////////////
SetupTextures(info, version);
///////////////////////////
// Set up //
///////////////////////////
info.m_hasParkingSpaces = true;
info.m_pavementWidth = (version != NetInfoVersion.Slope && version != NetInfoVersion.Tunnel ? 5 : 7);
info.m_halfWidth = (version == NetInfoVersion.Bridge || version == NetInfoVersion.Elevated ? 14 : 16);
if (version == NetInfoVersion.Tunnel)
{
info.m_setVehicleFlags = Vehicle.Flags.Transition | Vehicle.Flags.Underground;
info.m_setCitizenFlags = CitizenInstance.Flags.Transition | CitizenInstance.Flags.Underground;
info.m_class = roadTunnelInfo.m_class.Clone(NetInfoClasses.NEXT_MEDIUM_ROAD_TUNNEL);
}
else if (version == NetInfoVersion.Bridge)
{
info.m_class = bridgeInfo.m_class.Clone(NetInfoClasses.NEXT_MEDIUM_ROAD);
}
else
{
info.m_class = roadInfo.m_class.Clone(NetInfoClasses.NEXT_MEDIUM_ROAD);
}
// Setting up lanes
info.SetRoadLanes(version, new LanesConfiguration
{
IsTwoWay = true,
LanesToAdd = -2,
LaneWidth = 3.8f,
BusStopOffset = 2.9f,
CenterLane = CenterLaneType.Median,
CenterLaneWidth = 3.8f
});
var leftPedLane = info.GetLeftRoadShoulder();
var rightPedLane = info.GetRightRoadShoulder();
// Fix for T++ legacy support
if (version == NetInfoVersion.Ground)
{
var lanes = info.m_lanes.OrderBy(l => l.m_position).ToArray();
var lanesLegacyOrder = new[]
{
lanes[2],
lanes[3],
lanes[4],
lanes[5],
lanes[0],
lanes[7],
lanes[1],
lanes[6]
};
info.m_lanes = lanesLegacyOrder;
}
//Setting Up Props
var leftRoadProps = leftPedLane.m_laneProps.m_props.ToList();
var rightRoadProps = rightPedLane.m_laneProps.m_props.ToList();
if (version != NetInfoVersion.Tunnel)
{
var leftStreetLight = leftRoadProps.FirstOrDefault(p => p.m_prop.name.ToLower().Contains("new street light"));
if (leftStreetLight != null)
{
leftStreetLight.m_finalProp =
leftStreetLight.m_prop = Prefabs.Find<PropInfo>(MediumAvenueSideLightBuilder.NAME);
}
var rightStreetLight = rightRoadProps.FirstOrDefault(p => p.m_prop.name.ToLower().Contains("new street light"));
if (rightStreetLight != null)
{
rightStreetLight.m_finalProp =
rightStreetLight.m_prop = Prefabs.Find<PropInfo>(MediumAvenueSideLightBuilder.NAME);
}
}
if (version == NetInfoVersion.Slope)
{
leftRoadProps.AddLeftWallLights(info.m_pavementWidth);
rightRoadProps.AddRightWallLights(info.m_pavementWidth);
}
//.........这里部分代码省略.........