private void Start() { panel = GameObject.FindGameObjectsWithTag("DialogueTextbox")[0]; textbox = panel.transform.GetChild(0).gameObject; textHolder = textbox.transform.GetChild(0).gameObject.GetComponent<Text>(); namebox = panel.transform.GetChild(1).gameObject; nameHolder = namebox.transform.GetChild(0).gameObject.GetComponent<Text>(); textbox.SetActive(false); player = FindObjectOfType<RoyCheck>(); dialogue = new StringBuilder(); lineQ = new Queue(); namebox.SetActive(false); }
void Start() { anim = GetComponent <Animator>(); respawnPoint = transform.position; rb = GetComponent <Rigidbody2D>(); rc = GetComponent <RoyCheck>(); pushll = GetComponent <PushPull>(); rb.velocity = Vector3.zero; Vector3 entry = GlobalEvents.GetEntry(SceneManager.GetActiveScene().name); if (entry != Vector3.zero) { respawnPoint = entry; rb.transform.position = entry; GameObject.Find("CamPoint").GetComponent <CameraBounder>().Limit(); if (!GlobalEvents.GetFacingDir(SceneManager.GetActiveScene().name)) { rc.Flip(); } } }