Beispiel #1
0
    public void ActivateHandSlicer()
    {
        TextMeshPro[] texts   = GameObject.Find("ChangeHandState").GetComponentsInChildren <TextMeshPro>();
        HandSlice     ctplane = GameObject.Find("CTPlane3").GetComponent <HandSlice>();

        ctplane.active = true;
        foreach (TextMeshPro tmp in texts)
        {
            tmp.text = "Deactivate Hand Slicer";
        }
    }
Beispiel #2
0
    public void ChangeHandSlicerState()
    {
        Debug.Log("Change Hand State Pressed");

        HandSlice ctplane = GameObject.Find("CTPlane3").GetComponent <HandSlice>();

        if (ctplane.active == true)
        {
            DeactivateHandSlicer();
        }
        else
        {
            ActivateHandSlicer();
        }
    }
Beispiel #3
0
    public void ChangeHandness()
    {
        Debug.Log("Change Handness pressed");

        TextMeshPro[] texts   = GameObject.Find("ChangeHandness").GetComponentsInChildren <TextMeshPro>();
        HandSlice     ctplane = GameObject.Find("CTPlane3").GetComponent <HandSlice>();

        if (ctplane.leftHanded == true)
        {
            ctplane.leftHanded = false;
            foreach (TextMeshPro tmp in texts)
            {
                tmp.text = "Use Left Hand";
            }
        }
        else
        {
            ctplane.leftHanded = true;
            foreach (TextMeshPro tmp in texts)
            {
                tmp.text = "Use Right Hand";
            }
        }
    }
 // Start is called before the first frame update
 void Start()
 {
     GameObject handSlicer = GameObject.Find("CTPlane3");
     HandSlice  hs         = handSlicer.GetComponent <HandSlice>();
 }