コード例 #1
0
    private Color NoteColorToColor(NoteColor col)
    {
        Color color = Color.white;

        switch (col)
        {
        case NoteColor.blue:
            color = ColorExtension.hexToColor("007ACC");
            break;

        case NoteColor.green:
            color = Color.green;
            break;

        case NoteColor.yellow:
            color = Color.yellow;
            break;

        case NoteColor.pink:
            color = ColorExtension.hexToColor("EA81DC");
            break;
        }

        return(color);
    }
コード例 #2
0
    void OnDrawGizmos()
    {
        Camera cam = GetComponent <Camera>();

        if (aspect_current)
        {
            DrawAspect(cam, cam.pixelWidth, cam.pixelHeight, Color.green, true);
        }
        if (aspect_9_16)
        {
            DrawAspect(cam, 9, 16, Color.yellow);
        }
        if (aspect_4_3)
        {
            DrawAspect(cam, 4, 3, Color.cyan);
        }
        if (aspect_3_4)
        {
            DrawAspect(cam, 3, 4, ColorExtension.hexToColor("5468FF"));
        }
        if (aspect_16_9)
        {
            DrawAspect(cam, 16, 9, Color.red);
        }
        if (aspect_10_24)
        {
            DrawAspect(cam, 10, 24, Color.gray);
        }

        foreach (var item in aspects)
        {
            if (item == null || item.x == 0 || item.y == 0)
            {
                continue;
            }
            DrawAspect(cam, item.x, item.y, Color.gray);
        }

        Gizmos.color = Color.cyan.SetA(0.4f);
        if (guidesX != null)
        {
            foreach (float x in guidesX)
            {
                Gizmos.DrawLine(transform.position + new Vector3(x, -100, 0), transform.position + new Vector3(x, 100, 0));
            }
        }
        if (guidesY != null)
        {
            foreach (float y in guidesY)
            {
                Gizmos.DrawLine(transform.position + new Vector3(-100, y, 0), transform.position + new Vector3(100, y, 0));
            }
        }
    }
コード例 #3
0
 public InspectorNoteAttribute(string header, string message, string hexColor)
 {
     this.header  = header;
     this.message = message;
     this.color   = ColorExtension.hexToColor(hexColor);
 }