Пример #1
0
        private void Start()
        {
            // 프리팹들이 UI들을 모두 활성화 해서 보기좋게 해뒀기 떄문에, 위치 초기화가 필요함
            this.questUI = GetComponentInChildren <QuestUI>();
            (this.questUI.transform as RectTransform).anchoredPosition3D = Vector3.zero;
            this.questUI.gameObject.SetActive(false);

            this.dungeonUI = GetComponentInChildren <DungeonUI>();
            (this.dungeonUI.transform as RectTransform).anchoredPosition3D = Vector3.zero;
            this.dungeonUI.gameObject.SetActive(false);

            this.dialogViewer = GetComponentInChildren <UITextViewer>();
            (this.dialogViewer.transform as RectTransform).anchoredPosition3D = Vector3.zero;
            this.dialogViewer.gameObject.SetActive(false);

            this.selectionUI = GetComponentInChildren <SelectionUI>();
            (this.selectionUI.transform as RectTransform).anchoredPosition3D = Vector3.zero;
            this.selectionUI.gameObject.SetActive(false);

            this.gameResultUI = GetComponentInChildren <GameResultUI>();
            (this.gameResultUI.transform as RectTransform).anchoredPosition3D = Vector3.zero;
            this.gameResultUI.gameObject.SetActive(false);

            this.inventoryUI = GetComponentInChildren <InventoryUI>();
            (this.inventoryUI.transform as RectTransform).anchoredPosition3D = Vector3.zero;
            this.inventoryUI.gameObject.SetActive(false);

            this.storeUI = GetComponentInChildren <StoreUI>();
            (this.storeUI.transform as RectTransform).anchoredPosition3D = Vector3.zero;
            this.storeUI.gameObject.SetActive(false);
        }
Пример #2
0
        /// <summary>
        /// 대화를 완전히 종료한다
        /// </summary>
        private void EndDialog()
        {
            this.dialogBox.gameObject.SetActive(false);
            this.dialogBox = null;

            // 퀘스트 상태표시를 업데이트 한다.
            for (int i = 0; i < _normalNPCList.Count; i++)
            {
                _normalNPCList[i].QuestIconUpdate();
            }
        }
Пример #3
0
        /// <summary>
        /// 상호작용 버튼(E키) 눌렀을때 제일 처음호출되는 부분
        /// </summary>
        public override void InteractionEvent()
        {
            base.InteractionEvent();

            // 대화관련 퀘스트가 있을 경우 달성됨
            QuestManager.inst.CheckQuest_Accum(QuestCheckKey.QuestKey_Talk_ + this.npcKey, 1);

            // 다이얼로그 박스를 UI
            this.dialogBox = GameUI.inst.ViewDialogViewer();

            // 대사 큐 초기화
            ReadyDialog(new string[0]);
            this.isEndDialog = false;

            // 제일 먼저 보여줄 선택지 리스트 초기화.
            this.selectedIndex = -1;
            this.selectionList = CalcSelectionList();

            // 다이얼로그 초기화
            this.dialogBox.onComplete += OnFirstDialogComplete; // 첫대사가 끝나고 이벤트를 받을 수 있게
            this.dialogBox.PrintText(this.npcName, this.firstDialog[Random.Range(0, firstDialog.Length)], false);
            SoundManager.inst.PlaySound(SoundKeys.EFFECT_DIALOG, PlayerCamera.current.cam.transform.position, 0.7f);
        }