// Can call from Next Node Action or from Timeline public void UnpauseTimeline() { Script_DialogueManager dialogueManager = Script_DialogueManager.DialogueManager; dialogueManager.SetActive(true); director.Play(); director = null; }
private void InitializeTextObject( Script_InteractableObjectText iObj, List <Script_InteractableObject> interactableObjects, Script_DialogueManager dialogueManager, Script_Player player ) { interactableObjects.Add(iObj); iObj.SetupDialogueNodeText(dialogueManager, player); iObj.Id = interactableObjects.Count - 1; Script_SortingOrder so = iObj.GetRendererChild().GetComponent <Script_SortingOrder>(); iObj.Setup(so.enabled, so.sortingOrderIsAxisZ, so.offset); }
public void SetupInteractableObjectsText( Transform textObjectParent, List <Script_InteractableObject> interactableObjects, Script_DialogueManager dm, Script_Player player, bool isInitialize ) { Script_InteractableObjectText[] texts = textObjectParent .GetComponentsInChildren <Script_InteractableObjectText>(true); for (int i = 0; i < texts.Length; i++) { Script_InteractableObjectText text = texts[i]; if (isInitialize) { InitializeTextObject(text, interactableObjects, dm, player); } } }
public void OnNotify(Playable origin, INotification notification, object context) { Script_DialogueStartMarker dm = notification as Script_DialogueStartMarker; if (dm != null) { double time = origin.IsValid() ? origin.GetTime() : 0.0; Debug.LogFormat("Received dialogue start notification of type {0} at time {1}", dm.GetType(), time); Script_DialogueNode node = nodes[dm.dialogueNodeIndex]; bool isSFXOn = !dm.isSilent; Script_DialogueManager dialogueManager = Script_DialogueManager.DialogueManager; dialogueManager.StartDialogueNode(node, isSFXOn); if (dm.isPauseTimeline) { director = (origin.GetGraph().GetResolver() as PlayableDirector); director.Pause(); } } }
public void SetupInteractableFullArt ( Transform fullArtParent, List <Script_InteractableObject> interactableObjects, Script_DialogueManager dialogueManager, Script_Player player, bool isInitialize ) { Script_InteractableFullArt[] fullArts = fullArtParent .GetComponentsInChildren <Script_InteractableFullArt>(true); for (int i = 0; i < fullArts.Length; i++) { Script_InteractableFullArt fullArt = fullArts[i]; if (fullArt == null) { continue; } interactableObjects.Add(fullArt); print("fullArt is: " + fullArt); if (isInitialize) { fullArt.SetupDialogueNodeText(dialogueManager, player); fullArt.Id = interactableObjects.Count - 1; Script_SortingOrder so = fullArt.GetRendererChild().GetComponent <Script_SortingOrder>(); fullArt.Setup(so.enabled, so.sortingOrderIsAxisZ, so.offset); } } if (Debug.isDebugBuild && Const_Dev.IsDevMode) { Debug.Log("interactable objects count: " + interactableObjects.Count); } }
/// <summary> /// used when needing to specify particular textObj array instead of a parent /// </summary> public void SetupInteractableObjectsTextManually( Script_InteractableObjectText[] textObjs, List <Script_InteractableObject> interactableObjects, Script_DialogueManager dm, Script_Player player, bool isInitialize ) { for (int i = 0; i < textObjs.Length; i++) { Script_InteractableObjectText iObj = textObjs[i]; interactableObjects.Add(iObj); if (isInitialize) { InitializeTextObject(iObj, interactableObjects, dm, player); } } if (Debug.isDebugBuild && Const_Dev.IsDevMode) { Debug.Log("interactable objects count: " + interactableObjects.Count); } }
void Start() { dm = Script_DialogueManager.DialogueManager; }
public void Setup() { choiceCanvasTop.gameObject.SetActive(false); choiceCanvasBottom.gameObject.SetActive(false); dialogueManager = GetComponent <Script_DialogueManager>(); }