public static void HeightOutputEditor(MatrixGenerators.HeightOutput200 heightOut) { using (Cell.Padded(1, 1, 0, 0)) { using (Cell.LinePx(0)) { Cell.current.fieldWidth = 0.4f; if (GraphWindow.current.mapMagic != null) { using (Cell.LineStd) GeneratorDraw.DrawGlobalVar(ref GraphWindow.current.mapMagic.globals.height, "Height"); } if (GraphWindow.current.mapMagic != null) { using (Cell.LineStd) GeneratorDraw.DrawGlobalVar(ref GraphWindow.current.mapMagic.globals.heightInterpolation, "Interpolate"); } using (Cell.LineStd) Draw.Field(ref heightOut.outputLevel, "Out Level"); if (Cell.current.valChanged) { GraphWindow.RefreshMapMagic(heightOut); } } } }
public static Graph CreateBig() { Graph graph = CreateInstance <Graph>(); for (int j = 0; j < 10; j++) { MatrixGenerators.Noise200 noise = (MatrixGenerators.Noise200)Generator.Create(typeof(MatrixGenerators.Noise200), graph); graph.Add(noise); noise.guiPosition = new Vector2(-270, -100 + j * 200); MatrixGenerators.Terrace200 terrace = null; for (int i = 0; i < 98; i++) { MatrixGenerators.Terrace200 newTerrace = (MatrixGenerators.Terrace200)Generator.Create(typeof(MatrixGenerators.Terrace200), graph); graph.Add(newTerrace); newTerrace.guiPosition = new Vector2(-70 + 200 * i, -100 + j * 200); if (i == 0) { graph.Link(newTerrace, noise); } else { graph.Link(newTerrace, (IOutlet <object>)terrace); } terrace = newTerrace; } MatrixGenerators.HeightOutput200 output = (MatrixGenerators.HeightOutput200)Generator.Create(typeof(MatrixGenerators.HeightOutput200), graph); graph.Add(output); output.guiPosition = new Vector2(130 + 200 * 98, -100 + j * 200); graph.Link(output, terrace); } return(graph); }
public static Graph CreateTemplate() { Graph graph = GraphInspector.CreateInstance <Graph>(); MatrixGenerators.Noise200 noise = (MatrixGenerators.Noise200)Generator.Create(typeof(MatrixGenerators.Noise200)); graph.Add(noise); noise.guiPosition = new Vector2(-270, -100); MatrixGenerators.Erosion200 erosion = (MatrixGenerators.Erosion200)Generator.Create(typeof(MatrixGenerators.Erosion200)); graph.Add(erosion); erosion.guiPosition = new Vector2(-70, -100); graph.Link(erosion, noise); MatrixGenerators.HeightOutput200 output = (MatrixGenerators.HeightOutput200)Generator.Create(typeof(MatrixGenerators.HeightOutput200)); graph.Add(output); output.guiPosition = new Vector2(130, -100); graph.Link(output, erosion); return(graph); }