Inheritance: MonoBehaviour
    public void ActivateTouchOnEditingCroppedFace()
    {
        if (gameController.currentlySelectedFace == 1)
        {
            faceLeanScale         = croppedFace.GetComponent <LeanCustomScale>();
            faceLeanRotate        = croppedFace.GetComponent <LeanRotate>();
            croppedFaceController = croppedFace.GetComponent <CroppedFaceController>();
            faceParent            = croppedFace.transform.parent.gameObject;
            croppedFaceObject     = croppedFace.gameObject;
            //if (!gameController.isLoadedFace)
            //{
            //    gameController.saveDict["face1"] = true;
            //}
        }
        else if (gameController.currentlySelectedFace == 2)
        {
            faceLeanScale         = croppedFace2.GetComponent <LeanCustomScale>();
            faceLeanRotate        = croppedFace2.GetComponent <LeanRotate>();
            croppedFaceController = croppedFace2.GetComponent <CroppedFaceController>();
            faceParent            = croppedFace2.transform.parent.gameObject;
            croppedFaceObject     = croppedFace2.gameObject;
            //if (!gameController.isLoadedFace2)
            //{
            //    gameController.saveDict["face2"] = true;
            //}
        }


        faceLeanScale.enabled         = true;
        faceLeanRotate.enabled        = true;
        croppedFaceController.enabled = true;
        faceParent.GetComponent <UILineRenderer>().enabled = true;
    }
Exemplo n.º 2
0
    void setRotateControl(Product product)
    {
        LeanRotate leanRotate = product.productModel.AddComponent <LeanRotate>() as LeanRotate;

        leanRotate.IgnoreGuiFingers    = true;
        leanRotate.RequiredFingerCount = 2;
        leanRotate.RequiredSelectable  = leanSelectable;
        leanRotate.Camera     = camera;
        leanRotate.Relative   = true;
        leanRotate.RotateAxis = new Vector3(1, 0, 0);
    }