// ================================================= public Function =========================================================== // Displayer 표시 public void Init(string npcName, Sprite npcSprite, bool disabledPull, bool disabledLook, bool disabledPincer) { // 현재 대화하고 있는 npc 이름 갱신. this.npcName = npcName; // 이미지를 지정 NPCImage.sprite = npcSprite; NPCBigImage.sprite = npcSprite; // 각 모드들 준비 touchMode = PullMode.pullMode; touchMode.Init(); touchMode = LookMode.lookMode; touchMode.Init(); touchMode = PincerMode.pincerMode; touchMode.Init(); // Displayer 우측 버튼 초기화 observationWayManager.Init(disabledPull, disabledLook, disabledPincer); // Displayer 좌측 Text들 초기화 GottenItemTextInit(); ChatTextInit(); // Displayer 화면에 표시 Displayer.SetActive(true); }
// Displayer 우측 버튼 중 Pincer 버튼 클릭 public void OnClickPincerBtn() { /* * // 이미지 터치 기준 알파값 지정(터치 지점 알파값이 0.1f 이상인 경우에만 터치로 인정) * NPCImage.alphaHitTestMinimumThreshold = 0.1f; * NPCImage.raycastTarget = true; * * // Pull 행동에 대한 Event List 제거 * pullEvents.SetActive(false); * * // Look 행동에 대한 Event List 제거 * lookEvents.SetActive(false); * * touchMode = PincerMode.pincerMode; */ NPCImage.raycastTarget = false; // Pincer 행동에 대한 Event List 표시 pincerEvents.transform.Find(npcName).gameObject.SetActive(true); pincerEvents.SetActive(true); // Pull 행동에 대한 Event List 제거 pullEvents.SetActive(false); // Look 행동에 대한 Event List 제거 lookEvents.SetActive(false); touchMode = PincerMode.pincerMode; touchMode.Init(); }