Ejemplo n.º 1
0
    private IEnumerator StartDialogTurn(GameObject gameObject)
    {
        DialogTrigger dTrigger = gameObject.GetComponent <DialogTrigger>();

        cameraControl.MoveCamera(gameObject.transform.position);
        return(dTrigger.TriggerDialog());
    }
Ejemplo n.º 2
0
    private void Update()
    {
        if (playerInRange)
        {
            if (canInteract)
            {
                HandleInteractivesUI();
            }
            _canDesactivate = true;

            if (Input.GetButtonDown("Fire2"))
            {
                if (dialogTrigger.ReturnState() == DialogState.unactive)
                {
                    dialogTrigger.TriggerDialog();
                }
                else if (dialogTrigger.ReturnState() == DialogState.active && dialogTrigger.dialog.isTyped != true)
                {
                    dialogTrigger.DisplayNextSentence();
                }
            }
        }
        else
        {
            if (dialogTrigger.ReturnState() == DialogState.active && _canDesactivate)
            {
                dialogTrigger.EndDialog();
            }
            _canDesactivate = false;
        }
    }
Ejemplo n.º 3
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.TryGetComponent <Boat>(out Boat boat))
     {
         Stop();
         _trigger.TriggerDialog();
     }
 }
Ejemplo n.º 4
0
 // Start is called before the first frame update
 void Start()
 {
     dialogTrigger = GetComponent <DialogTrigger>();
     dialog        = new Dialog {
         Name = "JICE"
     };
     dialog.Sentences = new Queue();
     dialog.Sentences.Enqueue("GreatJob");
     dialogTrigger.TriggerDialog(dialog);
 }
Ejemplo n.º 5
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.CompareTag("Player"))
     {
         if (_dialogTrigger)
         {
             _dialogTrigger.TriggerDialog();
         }
     }
 }
Ejemplo n.º 6
0
 private void OnMouseDown()
 {
     if (onStopPoint == true && DataHolder.currentClientComplete == false && alreadySelected == false)
     {
         //FindObjectOfType<Sound>().ButtonSound();
         Debug.Log("Order price: " + GetComponent <Order>().GetPrice());
         //Destroy(onStopIcon);
         Destroy(outline);
         dialogTrigger.TriggerDialog();
         alreadySelected = true;
         //DataHolder.currentClientComplete = true;
         //dialogController.initDialog();
     }
 }
Ejemplo n.º 7
0
    // Update is called once per frame
    void Update()
    {
        if (_dt.activeOnEnter)
        {
            _dt.SetActiveOnEnterFalse();
        }

        if (_inOnTrigger)
        {
            if (Input.GetKeyDown(KeyCode.E) && _initialDialog)
            {
                _dt.TriggerDialog();
                _eKey.EtoInteractIsActive(false);
                _initialDialog = false;
            }
        }
    }
 // Update is called once per frame
 private void Update()
 {
     if (Vector3.Distance(PlayerManager.instance.Player.transform.position, transform.position) <= 2)
     {
         talktableTrigger.Play();
         if (Input.GetKeyDown(KeyCode.E))
         {
             OnDialogueFinished += CallbackOpenDoor;
             dialogueTrigger.TriggerDialog(OnDialogueFinished);
         }
     }
     else
     {
         if (talktableTrigger.IsTrigger())
         {
             talktableTrigger.Stop();
         }
     }
 }
Ejemplo n.º 9
0
 void EnableDialog(Collider2D coll)
 {
     //Invoke("_HideAlert", 5);
     Show();
     trigger.TriggerDialog(coll);
 }
Ejemplo n.º 10
0
 void startTalking()
 {
     beganDialog = true;
     dialogPanel.SetActive(true);
     dialogTrigger.TriggerDialog();
 }
Ejemplo n.º 11
0
 public void TriggerCrushDialog() => _dt.TriggerDialog();
Ejemplo n.º 12
0
 public void StartGammieDialogue() => _dt.TriggerDialog();
Ejemplo n.º 13
0
 public void StartHintDialog() => _dt.TriggerDialog();
Ejemplo n.º 14
0
 void OnEnable()
 {
     trigger.TriggerDialog();
 }
Ejemplo n.º 15
0
 public void startTalking()
 {
     dialogPanel.SetActive(true);
     dialogTrigger.TriggerDialog();
 }