/// <summary> /// 다이얼로그 파일 불러오기 /// </summary> public void LoadDialogue(Dialogue.Dialogue db) { _msgDialogueList.Clear(); //! 청소 _msgtimer.Clear(); _msgSprite.Clear(); _msgTitle = null; tempdb = null; _count = 0; if (db == null) { return; } var n = from set in db.setting where set.description != null select set.description; //? UI 설정 backui = db.backgroundUI; for (int m = 0; m < db.setting.Length; m++) { _msgtimer.Enqueue(db.setting[m].descriptionTime); _msgSprite.Enqueue(db.setting[m].description_Image); } foreach (var msg in n) { _msgDialogueList.Enqueue(msg); } _msgTitle = db.dialogueTitle; tempdb = db; Debug.Log(string.Format("Load Dialogue : {0}", _msgDialogueList.Count)); }
IEnumerator DailoguePlay(Dialogue.Dialogue db) { is_msg = true; WaitForSeconds wait = new WaitForSeconds(1f); DialogueManager.Instance.LoadDialogue(db); DialogueManager.is_Msg = true; yield return(wait); yield return(StartCoroutine(DialogueManager.Instance.ShowDialogue())); DialogueManager.is_Msg = false; _StoryNumber++; if (_StoryNumber >= dialogue.Length && !is_dialogueLoop) { dialoguetype = NPCDialogue.SpeechBubble; episodeclear = true; } else if (_StoryNumber >= dialogue.Length && is_dialogueLoop) { _StoryNumber = 0; } is_msg = false; }
private void OnCurrentDialogueChanged(Dialogue.Dialogue before, Dialogue.Dialogue after, IDialogueOwner owner) { if (owner != null) { transform.position = owner.transform.position; } }
public virtual void Start() { if (tile()) { tile().character = this; } d = GetComponent <Dialogue.Dialogue>(); }
public override void OnAction(Character c) { base.OnAction(c); if (c is Player) { print("ACTION"); Dialogue.Dialogue d = gameObject.GetComponent <Dialogue.Dialogue> (); if (d != null) { print("dialogue"); d.Apply(); } } }
public void StartDialogueMsg(Dialogue.Dialogue db) { if (_dialogueenum == DialoguePettonEnum.STORYMSG) { //! 대화중이므로 이동 금지 HJ.Manager.DialogueManager.is_keypad = false; //! 대화내용 DB 로드 HJ.Manager.DialogueManager.Instance.LoadDialogue(db); //! 대화내용 DB 완료시 대화 시작 StartCoroutine(HJ.Manager.DialogueManager.Instance.ShowDialogue()); } }
public override bool CanUse(Dialogue.Dialogue dialogue) { var currentAffinity = QuestSystemLoveHateBridgeManager.factionManager.GetAffinity(judgeFactionName, subjectFactionName); switch (filterType) { case FilterType.HigherThanOrEqual: return(currentAffinity >= affinity); case FilterType.LowerThanOrEqual: return(currentAffinity <= affinity); default: { DevdogLogger.LogWarning("Filter type of " + filterType + " not found, please report this error + Stack trace."); return(false); } } }
private void OnCurrentDialogueStatusChanged(DialogueStatus before, DialogueStatus after, Dialogue.Dialogue self, IDialogueOwner owner) { FireEvent("OnCurrentDialogueStatusChanged", after.ToString()); }
private void OnCurrentDialogueChanged(Dialogue.Dialogue before, Dialogue.Dialogue after, IDialogueOwner owner) { FireEvent("OnCurrentDialogueChanged", after); }
/// <summary> /// 다이얼로그 보여주기 /// </summary> /// <returns>다이얼로그 에셋</returns> public IEnumerator ShowDialogue() { float t; Sprite sp; is_Msg = true; is_nextmsg = true; temp2db = tempdb; temp2chicedb = tempchoicedb; if (_msgDialogueList.Count <= 0 || _msgtimer.Count <= 0) { //Debug.LogError(_msgDialogueList.Count +" " + _msgtimer.Count); try { //? 이벤트 실행 if (tempdb.subEvnet != null) { StartCoroutine(PlayEvent(0)); } //? 플레이메이커 이벤트 전송 if (tempdb._fsmFile != null) { tempdb._fsmFile.SendEvent(tempdb._fsmevent); } switch (tempdb.nextNODE._flow) { case FlowNode.FLOW.DIALOGUE: //? 다음 노드가 다이얼로그 인 경우 if (tempdb.nextNODE._NextNode != null) { LoadDialogue(tempdb.nextNODE._NextNode); StartCoroutine(ShowDialogue()); yield break; } break; case FlowNode.FLOW.CHOICEDIALOGUE: //? 다음 노드가 선택로그 인 경우 if (tempdb.nextNODE._ChoiceNode != null) { LoadChoiceDialogue(tempdb.nextNODE._ChoiceNode); StartCoroutine(ShowChoiceDialogue()); yield break; } break; } } catch (Exception e) { Debug.Log(e); } /* * if(tempdb.subEvnet.GetPersistentEventCount() > 0) * tempdb.subEvnet.Invoke(); */ is_keypad = true; is_Msg = false; is_nextmsg = false; HideDialogueObject(); //? 오브젝트 비활성화 yield break; } ShowDialogueObject(); //? 오브젝트 표시 BackGroundChange(); t = _msgtimer.Dequeue(); _m = _msgDialogueList.Dequeue(); _DialogueText.text = ""; _DialogueText.DOText(_m, t); sp = _msgSprite.Dequeue(); //? 이미지 표시 if (sp != null) { switch (facepos) { case FACEPOS.LEFT: _FaceLeft.sprite = sp; _FaceRight.sprite = _NullMask; facepos = FACEPOS.RIGHT; break; case FACEPOS.RIGHT: _FaceRight.sprite = sp; _FaceLeft.sprite = _NullMask; facepos = FACEPOS.LEFT; break; } } yield return(new WaitForSeconds(t + 0.7f)); _m = null; is_Msg = false; }
public override bool CanUse(Dialogue.Dialogue dialogue) { return(statRequirement.CanUse(PlayerManager.instance.currentPlayer.inventoryPlayer)); }
public override bool CanUse(Dialogue.Dialogue dialogue) { return(AbidesFilter()); }