public void SkipTutorial() { Inventory.TutorialSkip(); dc = Resources.FindObjectsOfTypeAll <DialogueCanvas>()[0]; if (dc.gameObject.activeSelf) { dc.GetComponentsInChildren <CanvasGroup>()[0].interactable = true; dc.GetComponentsInChildren <CanvasGroup>()[0].blocksRaycasts = true; dc.GetComponentsInChildren <CanvasGroup>()[0].alpha = 1.0f; dc.GetComponent <DialogueCanvas>().active = false; dc.gameObject.SetActive(false); dc.GetComponentsInChildren <Button>()[0].onClick.RemoveAllListeners(); exitButton.SetActive(true); } Time.timeScale = 1; if (cat != null) { GameObject.FindObjectOfType <Pathfinding>().InitializePath(cat.transform.position, new Vector3(0.5f, -4.5f, 0), 0, path); } skipButton.SetActive(false); doorway.SetActive(true); GameObject.FindObjectOfType <Player>().allowedToMove = true; finishedTutorial = true; doingTutorial = false; dc.GetComponentsInChildren <Text>()[4].text = ""; }
public void ExitButton() { dc.GetComponentInChildren <Text>().enabled = true; dc.GetComponentsInChildren <CanvasGroup>()[0].interactable = true; dc.GetComponentsInChildren <CanvasGroup>()[0].blocksRaycasts = true; dc.GetComponentsInChildren <CanvasGroup>()[0].alpha = 1.0f; dc.GetComponent <DialogueCanvas>().active = false; dc.GetComponentsInChildren <Button>()[0].onClick.RemoveAllListeners(); exitButton.SetActive(true); dc.gameObject.SetActive(false); if (finishedTutorial) { Time.timeScale = 1; GameObject.FindObjectOfType <Pathfinding>().InitializePath(cat.transform.position, new Vector3(0.5f, -4.5f, 0), 0, path); player.allowedToMove = true; doingTutorial = false; doorway.SetActive(true); dc.GetComponentsInChildren <Text>()[4].text = ""; } }