private void OnTriggerExit2D(Collider2D collision) { if (collision.GetComponent <NiggaScript>() != null) { isInsideInteractive = false; script.Deselect(); script = null; } }
private void OnTriggerEnter2D(Collider2D collision) { script = collision.GetComponent <NiggaScript>(); if (script != null) { isInsideInteractive = true; script.Select(); } }