// Update is called once per frame //void Update() //{ // if (grabbable.isGrabbed == true) // { // if (join == true) // { // joinMatch.JoinMatch(); // join = false; // } // } //} private void OnTriggerEnter(Collider other) { if (other.tag == "Player") { if (join == true) { joinMatch.JoinMatch(); join = false; } } }
// Update is called once per frame void Update() { if (grabbable.isGrabbed == true) { if (join == true) { joinMatch.JoinMatch(); join = false; } } }