// Start button click handler public void Start_Clicked(GameObject button) { StartButton.setActiveStatus(false); Reset.setActiveStatus(true); SpatialUnderstanding.SetActive(false); mainMenuContainer.SetActiveStatus(true); MainBox.GetComponent <Movement>().enabled = false; BoundingBox.SetActive(false); //WholeBox.SetActive(false); Camera.GetComponent <RaycastPositioningV1>().enabled = false; //LocationManager.Instance.BeginLocationSync(); }
// Use this for initialization void Start() { ComponentWindowPanel = windowManager.transform.Find("ComponentWindow").gameObject; // create holographic buttons to get started with mainMenuContainer.ButtonClicked += OnButtonClicked; homeButton.Clicked += HomeButton_Clicked; StartButton.Clicked += Start_Clicked; Reset.Clicked += Reset_Clicked; ValidateButton.Clicked += Validate_Clicked; if (homeButton.isActiveAndEnabled) { homeButton.setActiveStatus(false); } SceneLink.Instance.OnStateChange += SceneLink_OnStateChange; }
// HomeButton click event handler private void HomeButton_Clicked(GameObject button) { if (SceneLink.Instance.transform.GetComponentInChildren <CreateWires>()) { SceneLink.Instance.transform.GetComponentInChildren <CreateWires>().ResetWireConnections(); Debug.Log("Values reset"); } button.SetActive(false); if (inDecomp) { StartCoroutine(GoToHome()); windowManager.GetComponent <FadeIn>().FadeOut(); } else { if (boxStatus) { boxStatus = false; //MainBoxDoor.SetActive(true); //MainBoxPanel.SetActive(true); } windowManager.SetActive(false); mainMenuContainer.SetActiveStatus(true); // Hide home button //WholeBox.SetActive(false); Reset.setActiveStatus(true); SetVertxEventHandlerState(false); // REmove CollabVertxObjectHAndler //SceneLink.Instance.GetComponent<SceneLinkEventManager>().RemoveCollabVertxObjectHandler(); //sceneLink.GetComponent<SwitchAndConnectorNode>().enabled = false; //MainBox.GetComponent<Movement>().enabled = false; MainBox.GetComponent <BoxCollider>().enabled = true; ValidateButton.setActiveStatus(false); } }