예제 #1
0
    void OnCollisionEnter2D(Collision2D coll)
    {
        if (coll.gameObject.tag == "Player")
        {
            if (!dialogUI.activeSelf)
            {
                dialogUI.SetActive(true);
            }
            Debug.Log("Player Entered");
            dialogCollider.enabled = false;

            dialogTrigger.TriggerDialogue();
        }
    }
예제 #2
0
 void StartDialog(GameObject peasant)
 {
     dialogTrigger = peasant.AddComponent <DialogTrigger>();
     dialogTrigger.Spawn();
     dialogTrigger.TriggerDialogue();
 }