Ejemplo n.º 1
0
 private void OnTriggerExit2D(Collider2D collision)
 {
     if (collision.gameObject.GetComponent <DialogSpot>() != null)
     {
         VerbUI.Hide(VerbType.ASK);
     }
 }
Ejemplo n.º 2
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        var portal = collision.GetComponent <Portal>();

        if (portal != null)
        {
            VerbUI.Show(VerbType.OPEN);
            collidingPortal.Add(portal);
        }
    }
Ejemplo n.º 3
0
    private void OnTriggerExit2D(Collider2D collision)
    {
        var portal = collision.GetComponent <Portal>();

        if (portal != null)
        {
            VerbUI.Hide(VerbType.OPEN);
            collidingPortal.Remove(portal);
        }
    }
Ejemplo n.º 4
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        var witness = collision.GetComponent <Witness>();

        if (witness != null && InvestigationManager.me.currentCase == witness.GetCase())
        {
            VerbUI.Show(VerbType.ASK);
            collidingWitness.Add(witness);
        }
    }
Ejemplo n.º 5
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        var spot = collision.GetComponent <InvestigationSpot>();

        if (spot != null)
        {
            VerbUI.Show(VerbType.LOOK);
            collidingSpots.Add(spot);
        }
    }
Ejemplo n.º 6
0
    private void OnTriggerExit2D(Collider2D collision)
    {
        var spot = collision.GetComponent <InvestigationSpot>();

        if (spot != null)
        {
            VerbUI.Hide(VerbType.LOOK);
            collidingSpots.Remove(spot);
        }
    }
Ejemplo n.º 7
0
    private void OnTriggerExit2D(Collider2D collision)
    {
        Clue clue = collision.gameObject.GetComponent <Clue>();

        if (clue != null)
        {
            if (clue.GetCase() == InvestigationManager.me.currentCase)
            {
                collidingClues.Remove(collision.gameObject.GetComponent <Clue>());
                VerbUI.Hide(VerbType.INVESTIGATE);
            }
        }
    }
Ejemplo n.º 8
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        var dialogSpot = collision.gameObject.GetComponent <DialogSpot>();

        if (dialogSpot != null)
        {
            bool available = (dialogSpot.oneTimeOnly && !dialogSpot.played) || !dialogSpot.oneTimeOnly;
            if (dialogSpot.autoStart && available)
            {
                DialogUI.StartDialog(dialogSpot.data, false);
                dialogSpot.Play();
            }
            else if (!dialogSpot.autoStart)
            {
                VerbUI.Show(VerbType.ASK);
            }
        }
    }