void Start() { drawDebug = GameObject.FindObjectOfType<DrawDebug>(); windManager = WindManager.instance; fluidWidth = windManager.width; fluidHeight = windManager.height; drawDebug.selectedWidthIndex = fluidWidth / 2; drawDebug.selectedHeightIndex = fluidHeight / 2; }
void Start() { windManager = GameObject.FindObjectOfType<WindManager>(); drawDebug = GameObject.FindObjectOfType<DrawDebug>(); cameraOrigin = GameObject.Find("CameraOrigin").transform; cellSize = windManager.cellSize; fluidWidth = windManager.width; fluidHeight = windManager.height; fluidDepth = windManager.depth; drawDebug.selectedWidthIndex = windManager.width / 2; drawDebug.selectedHeightIndex = windManager.height / 2; drawDebug.selectedDepthIndex = windManager.depth / 2; }
void DrawPoints() { SetFillColor(Color.HSVToRGB(0.6f, 0.7f, 1)); SetStrokeColor(Color.black); SetStrokeThickness(pointStrokeThickness); SetStrokeAlignement(StrokeAlignment.Outside); PushCanvas(); TranslateCanvas(0, 0, -0.01f); // Place in front. DrawDebug.DrawPolygonPoints(_polygon, xOffset * 5, 0, pointDiameter, rotation); DrawDebug.DrawPolylinePoints(_polyline, xOffset * 6, 0, pointDiameter, rotation); PushCanvas(); TranslateCanvas(xOffset * 7, 0); DrawDebug.DrawLinePoints(0, -0.5f, 0, 0.5f, pointDiameter, rotation); PopCanvas(); PopCanvas(); }
internal static void InvokeDrawDebug(object sender, EventArgs e) { DrawDebug.Invoke(sender, e); }