public void Recalculate() { m_bridgePillarInfo = PillarUtils.GetDefaultBridgePillar(Prefab); m_bridgePillarInfo2 = PillarUtils.GetDefaultBridgePillar2(Prefab); m_bridgePillarInfo3 = PillarUtils.GetDefaultBridgePillar3(Prefab); m_bridgePillarInfos = PillarUtils.GetDefaultBridgePillars(Prefab); m_middlePillarInfo = PillarUtils.GetDefaultMiddlePillar(Prefab); DestroySkinnedNetLaneProps(); if (Prefab.m_lanes != null) { m_lanes = new NetInfo.Lane[Prefab.m_lanes.Length]; Array.Copy(Prefab.m_lanes, m_lanes, m_lanes.Length); } m_hasWires = true; if (Prefab.m_segments != null) { m_segments = new NetInfo.Segment[Prefab.m_segments.Length]; Array.Copy(Prefab.m_segments, m_segments, m_segments.Length); } m_createPavement = Prefab.m_createPavement; m_createGravel = Prefab.m_createGravel; m_createRuining = Prefab.m_createRuining; m_clipTerrain = Prefab.m_clipTerrain; m_color = Prefab.m_color; UpdateHasWires(); foreach (var modifier in _modifiers) { modifier.Apply(this); } }
public PillarPatcherState(NetInfo prefab) { BridgePillarInfo = PillarUtils.GetDefaultBridgePillar(prefab); BridgePillarInfo2 = PillarUtils.GetDefaultBridgePillar2(prefab); BridgePillarInfo3 = PillarUtils.GetDefaultBridgePillar3(prefab); BridgePillarInfos = PillarUtils.GetDefaultBridgePillars(prefab); MiddlePillarInfo = PillarUtils.GetDefaultMiddlePillar(prefab); }