Exemple #1
0
    void Update()
    {
        if (painter)
        {
            if (Input.GetAxis("Mouse ScrollWheel") > 0f)
            {
                painter.ChangeColor(true);
            }
            else if (Input.GetAxis("Mouse ScrollWheel") < 0f)
            {
                painter.ChangeColor(false);
            }

            if (Input.GetMouseButtonDown(1))
            {
                painter.SetEraser(true);
            }

            if (Input.GetMouseButtonUp(1))
            {
                painter.SetEraser(false);
            }

            if (Input.GetMouseButtonDown(2))
            {
                painter.CleanPainter();
            }
        }
    }