Ejemplo n.º 1
0
    public void teleporter()
    {
        couldteleport = !couldteleport;
        canteleport   = !canteleport;


        if (couldteleport == true)
        {
            cursor.SetActive(false);
            BrushManager.canpaint = false;
            teleportbutton.color  = Color.gray;
            laser.SetActive(true);
            con.GetComponent <SteamVR_Teleporter> ().teleportOnClick = true;
            teltext.text = "Teleporter: On";
            brusher.deselectAllbrushes();

            Debug.Log(couldteleport);
        }
        else
        {
            if (BrushManager.brushswitchint == 0)
            {
                brusher.CylindarBrushtoggle();
            }
            else if (BrushManager.brushswitchint == 1)
            {
                brusher.flatbrushtoggle();
            }
            else if (BrushManager.brushswitchint == 2)
            {
                brusher.squarebrushtoggle();
            }
            cursor.SetActive(true);
            laser.SetActive(false);
            Debug.Log(couldteleport);
            teleportbutton.color = Color.white;
            con.GetComponent <SteamVR_Teleporter> ().teleportOnClick = false;
            teltext.text          = "Teleporter: Off";
            BrushManager.canpaint = true;
        }
    }