Exemplo n.º 1
0
 private void OnTriggerExit2D(Collider2D collision)
 {
     if (collision.tag == "Character")
     {
         interactiveCharacter.ShowInteraction(false);
         interactiveCharacter = null;
     }
     else if (collision.tag == "Sign")
     {
         SfxManager.I.Play("sfx_popup_interazione");
         sign.ShowInteraction(false);
         sign = null;
     }
 }
Exemplo n.º 2
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.tag == "Character")
     {
         interactiveCharacter = collision.GetComponent <Character>();
         interactiveCharacter.ShowInteraction(true);
     }
     else if (collision.tag == "Sign")
     {
         SfxManager.I.Play("sfx_popup_interazione");
         sign = collision.GetComponent <WorkSign>();
         sign.ShowInteraction(true);
     }
 }