Esempio n. 1
0
    void HandleDown(Vector3 input)
    {
        // check for 3d in world button events
        if (HandleButtons(input))
        {
            return;
        }

        // ignore finger position if you are painting in the right corner
        if ((input.x > Screen.width - 100) && (input.y < 100))
        {
            brush.gameObject.SetActive(true);
            brush.position       = target.position;
            ignoreFingerPosition = true;
        }
        else
        {
            brush.gameObject.SetActive(true);
            ignoreFingerPosition = false;
        }

        // start new art
        focus = Instantiate(prefabSwatch) as GameObject;
        focus.transform.parent = this.transform;

        Swatch3d art = focus.GetComponent <Swatch3d>() as Swatch3d;

        art.setup(color, style, material);
        HandleMove(input);
    }
Esempio n. 2
0
    void test()
    {
        focus = Instantiate(prefabSwatch) as GameObject;
        focus.transform.parent = this.transform;

        Swatch3d art = focus.GetComponent <Swatch3d>() as Swatch3d;

        art.setup(color, Swatch3d.STYLE.TUBE, material);

        Vector3 xyz     = brush.transform.position;
        Vector3 right   = brush.transform.right;
        Vector3 forward = brush.transform.forward;

        art.test(right, forward, DrawSizeDefault);

        focus = null;
    }
Esempio n. 3
0
    void DrawingBegin()
    {
/*
 *              // Support a special mode for painting in 3d rather than with screen as an aid
 *              if( (input.x > Screen.width - 100) && (input.y < 100)) {
 *                      ignoreFingerPosition = true;
 *              } else {
 *                      ignoreFingerPosition = false;
 *              }
 */
        // start new art swatch
        focus = Instantiate(prefabSwatch) as GameObject;
        focus.transform.parent = gameObject.transform;
        Swatch3d art = focus.GetComponent <Swatch3d>() as Swatch3d;

        art.setup(color, style, material);
        lastObject = null;
    }