Exemplo n.º 1
0
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Mouse0))
        {
            deformDirection = 1;
        }
        if (Input.GetKeyDown(KeyCode.Mouse1))
        {
            deformDirection = -1;
        }

        if (Input.GetKey(KeyCode.Mouse0) || Input.GetKey(KeyCode.Mouse1))
        {
            DrawOnPlane();
        }


        if (Input.GetKeyUp(KeyCode.Mouse0) || Input.GetKeyUp(KeyCode.Mouse1))
        {
            generator.UpdateMesh();
        }
    }