Ejemplo n.º 1
0
    /// <summary>
    /// Shows canvas when player steps into the trigger
    /// </summary>
    public void OnTriggerEnter(Collider other)
    {
        TriggerSender hitbox = other.GetComponent <TriggerSender>();

        if (hitbox != null && hitbox.GetReciever().GetRecieverGameObject().Equals(player.gameObject) && player.bodyHitbox.Equals(other.gameObject))
        {
            Debug.Log("Open");
            dialogCanvas.Open();
        }
    }