public override void prepare(TrackSegment4 trackSegment, GameObject putMeshOnGO) { base.prepare(trackSegment, putMeshOnGO); liftExtruder1 = null; if (trackSegment.isLifthill && (trackSegment is ChangeHeight4 || trackSegment.getStartpoint().y != trackSegment.getEndpoint().y || (UnityEngine.Object)frictionWheelsGO == (UnityEngine.Object)null)) { liftExtruder1 = instantiateLiftExtruder(trackSegment); } putMeshOnGO.GetComponent <Renderer>().sharedMaterial = base.material; centerTubeExtruder = new TubeExtruder(centerTubeRadius, centerTubeVertCount); centerTubeExtruder.setUV(14, 15); centerTubeExtruder.closeEnds = true; centerBoxExtruder = new BoxExtruder(centerTubeRadius * 2f, centerTubeRadius * 2f); centerBoxExtruder.setUV(14, 15); centerBoxExtruder.closeEnds = true; leftTubeExtruder = new TubeExtruder(sideTubesRadius, sideTubesVertCount); leftTubeExtruder.setUV(15, 14); rightTubeExtruder = new TubeExtruder(sideTubesRadius, sideTubesVertCount); rightTubeExtruder.setUV(15, 14); centerCrossTubeExtruder = new ResizableTubeExtruder(1f, centerTubeVertCount); centerCrossTubeExtruder.setUV(14, 15); centerCrossTubeExtruder.closeEnds = true; sideCrossTubeExtruder = new ResizableTubeExtruder(1f, centerTubeVertCount); sideCrossTubeExtruder.setUV(15, 14); crossBoxExtruder = new BoxExtruder(sideTubesRadius * 2f, sideTubesRadius * 1.8f); crossBoxExtruder.setUV(14, 14); collisionMeshExtruder = new BoxExtruder(base.trackWidth, 0.02665f); base.buildVolumeMeshExtruder = new BoxExtruder(base.trackWidth, 0.8f); base.buildVolumeMeshExtruder.closeEnds = true; base.setModelExtruders(centerTubeExtruder, leftTubeExtruder, rightTubeExtruder); }
public override void prepare(TrackSegment4 trackSegment, GameObject putMeshOnGo) { base.prepare(trackSegment, putMeshOnGo); putMeshOnGo.GetComponent <Renderer>().sharedMaterial = material; centerTubeExtruder = new TubeExtruder(CenterTubeRadius, CenterTubeVertCount); centerTubeExtruder.setUV(14, 14); leftTubeExtruder = new TubeExtruder(SideTubesRadius, SideTubesVertCount); leftTubeExtruder.setUV(14, 15); rightTubeExtruder = new TubeExtruder(SideTubesRadius, SideTubesVertCount); rightTubeExtruder.setUV(14, 15); collisionMeshExtruder = new BoxExtruder(trackWidth, 0.02666f); buildVolumeMeshExtruder = new BoxExtruder(trackWidth, 0.8f); buildVolumeMeshExtruder.closeEnds = true; }