private void checkTap() { lp.z = 0; Vector3 screenPoint = Camera.main.ScreenToWorldPoint(lp); hit = Physics2D.Raycast(screenPoint, Vector2.zero); Debug.Log("checkTap"); if (hit.collider != null) { string hitObject = hit.transform.gameObject.name; switch (hitObject) { case "FishBoss": AudioManager.PlayAudio(AudioType.UI_Dialogue); FinalCameraController.BossTalk(); break; case "PlayerBodySubway": AudioManager.PlayAudio(AudioType.UI_Dialogue); FinalCameraController.ChangeToCloth(); break; case "PlayerHeadSubway": AudioManager.PlayAudio(AudioType.UI_Dialogue); FinalCameraController.ChangeToCloth(); break; case "SettingButton": AudioManager.PlayAudio(AudioType.UI_Dialogue); FinalCameraController.clickSetting(); break; case "subwayMap": AudioManager.PlayAudio(AudioType.UI_Dialogue); FinalCameraController.ChangeToMap(); break; case "Lost&Found_basket": AudioManager.PlayAudio(AudioType.UI_Dialogue); LostAndFound.clickLostFound(); break; } Regex mRegular = new Regex(@"Poster\d+", RegexOptions.None); if (mRegular.IsMatch(hit.transform.gameObject.name)) { AdsController.ClickBackground(hit.transform.GetComponent <SpriteRenderer>().sprite.name); } //DebugOutput.GetComponent<Text>().text = hit.transform.gameObject.name; Debug.Log(hit.transform.gameObject.name); } }
IEnumerator StartChapterOne() { Hide(chapterOne); FinalCameraController.ChangeToMap(); yield return(new WaitForSeconds(0.5f)); Show(instructionCG); StartCoroutine(AnimateText(instructionText, "The laundromat is in a subway car", false, null, Vector2.zero));//clicktime = 1; Show(arrowButton); Show(FinalCameraController.SubwayMap); // instructionText.text = "Clothes are delivered in at each station."; }