DrawWireCube() public static method

public static DrawWireCube ( Vector3 center, Vector3 size ) : void
center Vector3
size Vector3
return void
コード例 #1
0
 private void DrawPlatforms()
 {
     if (!showAnims)
     {
         return;
     }
     G.color = C.white;
     G.DrawWireCube(V3.right * 2 + V3.up * M.Sin(radians * M.PI) + V3.up * -.25f, new V3(1, .5f, 0));
     G.DrawWireCube(V3.right * 3 + V3.up * M.Sin(radians * M.PI / 2) + V3.up * -.25f, new V3(1, .5f, 0));
     G.DrawWireCube(V3.right * 4 + V3.up * M.Sin(radians * M.PI / 2) * .5f + V3.up * -.25f, new V3(1, .5f, 0));
 }
コード例 #2
0
    private void AxialInput()
    {
        offset = axialOffset;

        if (M.Abs(Input.GetAxis("Horizontal")) > 0 || M.Abs(Input.GetAxis("Vertical")) > 0)
        {
            input = new Vector2(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical"));
        }

        G.DrawWireCube(offset, new V3(2, 2, 0));
        G.color = C.magenta;
        G.DrawLine(offset, (Vector3)input + offset);

        var x = input.x;
        var y = input.y;

        G.color = C.red;
        G.DrawLine(offset, offset + V3.right * x);
        G.color = C.green;
        G.DrawLine(offset, offset + V3.up * y);
        G.color = C.black * .5f;
        G.DrawRay(offset, new V3(x, y).normalized);
    }