コード例 #1
0
ファイル: Player.cs プロジェクト: simonchauvin/2D-Fluid
    void Start()
    {
        drawDebug = GameObject.FindObjectOfType<DrawDebug>();
        windManager = WindManager.instance;

        fluidWidth = windManager.width;
        fluidHeight = windManager.height;
        drawDebug.selectedWidthIndex = fluidWidth / 2;
        drawDebug.selectedHeightIndex = fluidHeight / 2;
    }
コード例 #2
0
ファイル: Player.cs プロジェクト: simonchauvin/3D-Fluid
    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;
    }
コード例 #3
0
        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();
        }
コード例 #4
0
ファイル: Graphics.cs プロジェクト: vizv/SMAPI
 internal static void InvokeDrawDebug(object sender, EventArgs e)
 {
     DrawDebug.Invoke(sender, e);
 }