예제 #1
0
파일: MoveTool.cs 프로젝트: ttldtor/NoteCAD
    void OnEndEdit(string value)
    {
        if (valueConstraint == null)
        {
            return;
        }
        var sign = Math.Sign(valueConstraint.GetValue());

        valueConstraint.SetValue(sign * value.ToDouble());
        valueConstraint = null;
        input.gameObject.SetActive(false);
    }
예제 #2
0
    void OnEndEdit(string value)
    {
        if (valueConstraint == null)
        {
            return;
        }
        var sign = Math.Sign(valueConstraint.GetValue());

        if (sign == 0)
        {
            sign = 1;
        }
        if (shouldPushUndo)
        {
            editor.PushUndo();
        }
        valueConstraint.SetValue(sign * value.ToDouble());
        valueConstraint = null;
        input.gameObject.SetActive(false);
    }