/// <summary> /// Called we want a player to be able to control a maze on their turn. /// </summary> private void enableMaze() { GameObject.Find("Main Camera").GetComponent <Player>().isMoveAllowed = true;//allow the player to move the maze on the other hololens //dont let them see their maze ball.GetComponent <MeshRenderer>().enabled = false; Maze1.GetComponent <MeshRenderer>().enabled = false; Maze2Plane.GetComponent <MeshRenderer>().enabled = false; StartCoroutine(stopBall()); //wait to disable the ball since the maze lerps }
/// <summary> /// Called we want a player to not control a maze on another players turn. /// </summary> private void disableMaze() { GameObject.Find("Main Camera").GetComponent <Player>().isMoveAllowed = false;// dont allow player to manipulate the maze on the other hololens //allow them to see the maze the other player is controling ball.GetComponent <MeshRenderer>().enabled = true; ball.GetComponent <Rigidbody>().isKinematic = false; if (difficulty == 2 || difficulty == 3) { Maze2Plane.GetComponent <MeshRenderer>().enabled = true; } else { Maze1.GetComponent <MeshRenderer>().enabled = true; } }