public ActionVertexColorProgression Clone()
    {
        ActionVertexColorProgression color_progression = new ActionVertexColorProgression(new VertexColour());

        color_progression.m_progression                 = m_progression;
        color_progression.m_ease_type                   = m_ease_type;
        color_progression.m_from                        = m_from.Clone();
        color_progression.m_to                          = m_to.Clone();
        color_progression.m_to_to                       = m_to_to.Clone();
        color_progression.m_to_to_bool                  = m_to_to_bool;
        color_progression.m_is_offset_from_last         = m_is_offset_from_last;
        color_progression.m_unique_randoms              = m_unique_randoms;
        color_progression.m_override_animate_per_option = m_override_animate_per_option;
        color_progression.m_animate_per                 = m_animate_per;

        return(color_progression);
    }
    public ActionVertexColorProgression Clone()
    {
        ActionVertexColorProgression color_progression = new ActionVertexColorProgression(new VertexColour());

        color_progression.m_progression = m_progression;
        color_progression.m_ease_type = m_ease_type;
        color_progression.m_from = m_from.Clone();
        color_progression.m_to = m_to.Clone();
        color_progression.m_to_to = m_to_to.Clone();
        color_progression.m_to_to_bool = m_to_to_bool;
        color_progression.m_is_offset_from_last = m_is_offset_from_last;
        color_progression.m_unique_randoms = m_unique_randoms;
        color_progression.m_override_animate_per_option = m_override_animate_per_option;
        color_progression.m_animate_per = m_animate_per;

        return color_progression;
    }
示例#3
0
    public float DrawVertexColourEditorGUI(ActionVertexColorProgression colour_prog, GUIContent label, Rect position, bool offset_legal, bool unique_random_legal = false, bool bold_label = true)
    {
        float y_offset = DrawProgressionEditorHeader(colour_prog, label, position, offset_legal, unique_random_legal, bold_label);
        float x_offset = position.x + ACTION_INDENT_LEVEL_1;

        EditorGUI.LabelField(new Rect(x_offset, y_offset, 50, LINE_HEIGHT * 2), colour_prog.m_progression == ValueProgression.Constant ? "Colours" : "Colours\nFrom", EditorStyles.miniBoldLabel);
        x_offset += 60;

        colour_prog.m_from.top_left = EditorGUI.ColorField(new Rect(x_offset, y_offset, LINE_HEIGHT*2, LINE_HEIGHT), colour_prog.m_from.top_left);
        colour_prog.m_from.bottom_left = EditorGUI.ColorField(new Rect(x_offset, y_offset + LINE_HEIGHT, LINE_HEIGHT*2, LINE_HEIGHT), colour_prog.m_from.bottom_left);
        x_offset += 45;
        colour_prog.m_from.top_right = EditorGUI.ColorField(new Rect(x_offset, y_offset, LINE_HEIGHT*2, LINE_HEIGHT), colour_prog.m_from.top_right);
        colour_prog.m_from.bottom_right = EditorGUI.ColorField(new Rect(x_offset, y_offset + LINE_HEIGHT, LINE_HEIGHT*2, LINE_HEIGHT), colour_prog.m_from.bottom_right);

        if(colour_prog.m_progression != ValueProgression.Constant)
        {
            x_offset += 65;

            EditorGUI.LabelField(new Rect(x_offset, y_offset, 50, LINE_HEIGHT*2), "Colours\nTo", EditorStyles.miniBoldLabel);
            x_offset += 60;

            colour_prog.m_to.top_left = EditorGUI.ColorField(new Rect(x_offset, y_offset, LINE_HEIGHT*2, LINE_HEIGHT), colour_prog.m_to.top_left);
            colour_prog.m_to.bottom_left = EditorGUI.ColorField(new Rect(x_offset, y_offset + LINE_HEIGHT, LINE_HEIGHT*2, LINE_HEIGHT), colour_prog.m_to.bottom_left);
            x_offset += 45;
            colour_prog.m_to.top_right = EditorGUI.ColorField(new Rect(x_offset, y_offset, LINE_HEIGHT*2, LINE_HEIGHT), colour_prog.m_to.top_right);
            colour_prog.m_to.bottom_right = EditorGUI.ColorField(new Rect(x_offset, y_offset + LINE_HEIGHT, LINE_HEIGHT*2, LINE_HEIGHT), colour_prog.m_to.bottom_right);

            if(colour_prog.m_progression == ValueProgression.Eased && colour_prog.m_to_to_bool)
            {
                x_offset += 65;

                EditorGUI.LabelField(new Rect(x_offset, y_offset, 50, LINE_HEIGHT*2), "Colours\nThen To", EditorStyles.miniBoldLabel);
                x_offset += 60;

                colour_prog.m_to_to.top_left = EditorGUI.ColorField(new Rect(x_offset, y_offset, LINE_HEIGHT*2, LINE_HEIGHT), colour_prog.m_to_to.top_left);
                colour_prog.m_to_to.bottom_left = EditorGUI.ColorField(new Rect(x_offset, y_offset + LINE_HEIGHT, LINE_HEIGHT*2, LINE_HEIGHT), colour_prog.m_to_to.bottom_left);
                x_offset += 45;
                colour_prog.m_to_to.top_right = EditorGUI.ColorField(new Rect(x_offset, y_offset, LINE_HEIGHT*2, LINE_HEIGHT), colour_prog.m_to_to.top_right);
                colour_prog.m_to_to.bottom_right = EditorGUI.ColorField(new Rect(x_offset, y_offset + LINE_HEIGHT, LINE_HEIGHT*2, LINE_HEIGHT), colour_prog.m_to_to.bottom_right);
            }
        }

        return (y_offset + LINE_HEIGHT * 2 + 10) - position.y;
    }