public void Begin(string dialog, Character character, bool isCharAlive, AudioClip audioClip) { characterImage.sprite = character.DialogSprite; if (character.Name == "") { nameBack.SetActive(false); } else { nameBack.SetActive(true); } CurentDialogBegin?.Invoke(); characterImage.color = isCharAlive ? Color.white : Color.black; characterName.text = character.Name; pushDialogNext.gameObject.SetActive(true); stopClicking.gameObject.SetActive(true); VD.OnNodeChange += UpdateUI; VD.OnEnd += End; VD.BeginDialogue(dialog); if (audioClip != null && isCharAlive) { audioSource.clip = audioClip; audioSource.Play(); } }
void BeginDialogue() { VD.OnNodeChange += OnNodeChange; VD.OnEnd += OnEnd; VD.BeginDialogue(GetComponent <VIDE_Assign>()); dialogue_Background.SetActive(true); }
private void Begin() { VD.OnNodeChange += UpdateUI; VD.OnEnd += End; VD.BeginDialogue(GetComponent <VIDE_Assign>()); Debug.Log("ttt"); }
//This begins the conversation void Begin(VIDE_Assign dialogue) { //Let's reset the NPC text variables NPC_Text.text = ""; NPC_label.text = ""; playerLabel.text = ""; NPCPhotoFrame.transform.localEulerAngles = new Vector3(0, 0, Random.Range(rotationMin, rotationMax)); playerPhotoFrame.transform.localEulerAngles = new Vector3(0, 0, Random.Range(rotationMin, rotationMax)); //First step is to call BeginDialogue, passing the required VIDE_Assign component //This will store the first Node data in VD.nodeData //But before we do so, let's subscribe to certain events that will allow us to easily //Handle the node-changes VD.OnActionNode += ActionHandler; VD.OnNodeChange += UpdateUI; VD.OnEnd += EndDialogue; VD.BeginDialogue(dialogue); //Begins dialogue, will call the first OnNodeChange dialogueContainer.transform.DOKill(); dialogueContainer.transform.localPosition = new Vector3(0, 300); dialogueContainer.transform.DOLocalMoveY(0, .5f).SetEase(Ease.OutExpo); dialogueContainer.SetActive(true); //Let's make our dialogue container visible CameraFollow.instance.target = dialogue.gameObject.transform; CameraFollow.instance.ChangeDefaultDistance(false, CameraFollow.instance.zoomDefaultDistance); }
//Will start and end the assigned dialogue public void Interact() { if (!questChartContainer.activeSelf) { questChartContainer.SetActive(true); VD.NodeData nd = VD.BeginDialogue(assigned); LoadChart(nd); } else { for (int i = 0; i < peGameObject.transform.parent.childCount; i++) { if (i != 0) { Destroy(peGameObject.transform.parent.GetChild(i).gameObject); } } for (int i = 0; i < ovGameObject.transform.parent.childCount; i++) { if (i != 0) { Destroy(ovGameObject.transform.parent.GetChild(i).gameObject); } } questChartContainer.SetActive(false); VD.EndDialogue(); } }
public void Begin(VIDE_Assign videAssign) { VD.OnNodeChange += UpdateUI; VD.OnEnd += End; // This loads the VIDE_Assign into the VD. //If you want to play other dialogs, you would have to select a different VIDE_Assign here. VD.BeginDialogue(videAssign); }
protected void Begin() { PlayerMovements.isPlayerInputEnable = false; VD.OnNodeChange += UpdateUI; VD.OnEnd += End; VD.BeginDialogue(GetComponent <VIDE_Assign>()); VD.SetNode(HorseState.GET_STATE()); }
private void StartDialog(VIDE_Assign videAssign) { HideJoystick(); HideDialogAction(); ShowReplicaContainer(); VD.OnNodeChange += UpdateDialogUI; VD.OnEnd += EndDialog; VD.BeginDialogue(videAssign); }
void Begin() { VD.OnNodeChange += UpdateUI; VD.OnEnd += End; VD.BeginDialogue(GetComponent <VIDE_Assign>()); //Wappenteil Pferd freischalten StartCoroutine(rest.TransmitUnlockCoaSymbol()); }
public void StartEvent(string dialogueName) { eventPanel.SetActive(true); VD.OnNodeChange += UpdateUI; VD.OnEnd += EndDialogue; VD.BeginDialogue(dialogueName); Time.timeScale = 0; }
//Este metodo es el primero que se llama al empezar el dialogo public void Begin(VIDE_Assign vide_Assign, GameObject npc, GameObject npcTxt) { Container_NPC = npc; Container_NPC.SetActive(false); textNpc = npcTxt.GetComponent <Text>(); npcSayLine = npcTxt.GetComponent <SayLineText>(); VD.OnNodeChange += UpdateUI; VD.OnEnd += End; VD.BeginDialogue(vide_Assign); }
public void StartDialogue(string dialogue) { dialogueMenu.gameObject.SetActive(true); vIDE.AssignNew(dialogue); VD.OnNodeChange += UpdateNode; VD.OnEnd += EndDialog; VD.BeginDialogue(vIDE); }
public void LoadDialogue(string dialogueName, int overrideStartNode) { Setup(); VIDE_Assign assign = new VIDE_Assign(); assign.overrideStartNode = overrideStartNode; assign.AssignNew(dialogueName); VD.BeginDialogue(assign); }
//Called by UI button public void Begin() { if (!VD.isActive) { transform.GetChild(1).gameObject.SetActive(true); //UI stuff transform.GetChild(0).gameObject.SetActive(false); //UI stuff VD.OnNodeChange += NodeChangeAction; //Required events VD.OnEnd += End; //Required events VD.BeginDialogue(dialogueNameToLoad); } }
//This begins the conversation. private void Begin(VIDE_Assign dialogue) { //Subscribe to events VD.OnActionNode += ActionHandler; //VD.OnNodeChange += diagUI.UpdateUI; VD.OnEnd += EndDialogue; VD.BeginDialogue(dialogue); //Begins dialogue, will call the first OnNodeChange OnDialogueStart.Invoke(); dialogActive = true; }
private void Begin(VIDE_Assign dialogue) { VD.OnNodeChange += UpdateUI; VD.OnEnd += End; VD.BeginDialogue(dialogue); Debug.Log(GameManager.Instance.PlayerState.State); if (GameManager.Instance.PlayerState.SetPlayerState(PlayerState.States.InDialogue)) { Debug.Log("Set state"); } }
public void StartEvent() { eventPanel.SetActive(true); VD.OnNodeChange += UpdateUI; VD.OnEnd += EndDialogue; int randomDialog = GetRandomDialog(); VD.BeginDialogue(dialogues[randomDialog]); Time.timeScale = 0; }
public void StartDialogue(VIDE_Assign dialogue) { if (dialogue != null) { VD.OnNodeChange += UpdateUI; VD.OnEnd += End; VD.BeginDialogue(dialogue); } else { Debug.Log("UIManager, StartDialogueWith: tried to start a dialogue without proper dialogue specified"); } }
protected void OnBeginDialog() { VD.OnNodeChange += this.OnDialogChanged; try { VD.BeginDialogue(dialogAssignObj); } catch { Debug.Log("Error"); } }
void Start() { //Disable UI when starting just in case NPC_text.gameObject.SetActive(false); foreach (Text t in PLAYER_text) { t.transform.parent.gameObject.SetActive(false); } //Subscribe to some events and Begin the Dialogue VD.OnNodeChange += UpdateUI; VD.OnEnd += End; VD.BeginDialogue(GetComponent <VIDE_Assign>()); //This is the first most important method when using VIDE }
private void Begin() { VD.OnActionNode += ActionUI; VD.OnNodeChange += UpdateUI; VD.OnEnd += End; ResetPlayerChoiceTxt(); containerDialogue.SetActive(true); cursorManager.showDialogBox = true; if (npcVideAssign != null) { VD.BeginDialogue(npcVideAssign); } VD.SetNode(checkPoint); }
//This begins the conversation. void Begin(VIDE_Assign dialogue) { //Let's reset the NPC text variables NPC_Text.text = ""; NPC_label.text = ""; playerLabel.text = ""; //Subscribe to events VD.OnActionNode += ActionHandler; VD.OnNodeChange += UpdateUI; VD.OnEnd += EndDialogue; VD.BeginDialogue(dialogue); //Begins dialogue, will call the first OnNodeChange dialogueContainer.SetActive(true); //Let's make our dialogue container visible }
/// <summary> /// Called when the communication with a NPC begins. /// </summary> /// <param name="dialog">Dialogue lines for this NPC.</param> /// <param name="npcAvatar">Avatar of the NPC.</param> /// <param name="npcName">Name of the NPC.</param> public void OpenNPCCom(VIDE_Assign dialog, Sprite npcAvatar, string npcName) { if (!VD.isActive) { _npcComPanel.SetActive(true); ShipManager.Instance.StopShip(); Cursor.visible = true; _npcAvatar.sprite = npcAvatar; _npcName.text = npcName; VD.OnNodeChange += UpdateUI; VD.OnEnd += End; VD.BeginDialogue(dialog); } }
//This begins the conversation (Called by examplePlayer script) public void Begin(VIDE_Assign diagToLoad, GameObject textArea, bool isPlayerUp) { //Let's clean the NPC text variables uiContainer = textArea; talkText = uiContainer.transform.Find("Talk Text").GetComponent <Text>(); talkText.text = ""; VD.OnActionNode += ActionHandler; VD.OnNodeChange += NodeChangeAction; VD.OnEnd += EndDialogue; VD.BeginDialogue(diagToLoad); if (isPlayerUp) { PlayerUp(); } }
//This begins the conversation void Begin(VIDE_Assign dialogue) { //Let's reset the NPC text variables NPC_Text.text = ""; NPC_label.text = ""; playerLabel.text = ""; //First step is to call BeginDialogue, passing the required VIDE_Assign component //This will store the first Node data in VD.nodeData //But before we do so, let's subscribe to certain events that will allow us to easily //Handle the node-changes VD.OnActionNode += ActionHandler; VD.OnNodeChange += UpdateUI; VD.OnEnd += EndDialogue; VD.BeginDialogue(dialogue); //Begins dialogue, will call the first OnNodeChange dialogueContainer.SetActive(true); //Let's make our dialogue container visible }
//This begins the conversation (Called by examplePlayer script) public void Begin(VIDE_Assign diagToLoad) { //Let's clean the NPC text variables npcText.text = ""; npcName.text = ""; //First step is to call BeginDialogue, passing the required VIDE_Assign component //This will store the first Node data in VD.nodeData //But before we do so, let's subscribe to certain events that will allow us to easily //Handle the node-changes VD.OnActionNode += ActionHandler; VD.OnNodeChange += NodeChangeAction; VD.OnEnd += EndDialogue; SpecialStartNodeOverrides(diagToLoad); //This one checks for special cases when overrideStartNode could change right before starting a conversation VD.BeginDialogue(diagToLoad); //Begins conversation, will call the first OnNodeChange uiContainer.SetActive(true); }
// テキストの表示 void OnGUI() { if (VD.isActive) { var data = VD.nodeData; if (data.isPlayer) { for (int i = 0; i < data.comments.Length; i++) { // ボタンが押されたら if (GUILayout.Button(data.comments[i])) { // 次に移動 data.commentIndex = i; VD.Next(); } } } else { GUILayout.Label(data.comments[data.commentIndex]); if (GUILayout.Button("PUSH")) { VD.Next(); } } if (data.isEnd) { // VIDEの削除 VD.EndDialogue(); } } else { if (GUILayout.Button("ReturnStart")) { // VIDE_Assign読込み VD.BeginDialogue(GetComponent <VIDE_Assign>()); } } }
void OnGUI() { if (VD.isActive) { var data = VD.nodeData; //Quick reference if (data.isPlayer) // If it's a player node, let's show all of the available options as buttons { for (int i = 0; i < data.comments.Length; i++) { if (GUILayout.Button(data.comments[i])) //When pressed, set the selected option and call Next() { data.commentIndex = i; VD.Next(); } } } else //if it's a NPC node, Let's show the comment and add a button to continue { GUILayout.Label(data.comments[data.commentIndex]); if (GUILayout.Button(">")) { VD.Next(); } } if (data.isEnd) // If it's the end, let's just call EndDialogue { VD.EndDialogue(); } } else // Add a button to begin conversation if it isn't started yet { if (GUILayout.Button("Start Convo")) { VD.BeginDialogue(GetComponent <VIDE_Assign>()); //We've attached a VIDE_Assign to this same gameobject, so we just call the component } } }
void Begin() { VD.OnNodeChange += UpdateUI; VD.OnEnd += End; VD.BeginDialogue(GetComponent <VIDE_Assign>()); }
public void Begin(VIDE_Assign dialogue) { VD.BeginDialogue(dialogue); //Begins dialogue, will call the first OnNodeChange //Debug.Log("Entered Begin"); }