Exemple #1
0
    void OnTriggerEnter2D(Collider2D collider)
    {
        if (dialog == null)
        {
            return;
        }
        if (oneTime && hasRun)
        {
            return;
        }
        if (collider.isTrigger)
        {
            return;
        }
        if (collider.gameObject != GameManager.Instance.Player?.gameObject)
        {
            return;
        }

        DialogScreen.Open(dialog);

        this.hasRun = true;
    }