public void OnTriggerEnter2D(Collider2D collision) { if (!hasEntered && collision.transform == playertr) { animator.SetTrigger("doorState"); StartCoroutine(bc.ButtonState()); } hasEntered = true; }
public void OnTriggerEnter2D(Collider2D collision) { if (!hasEntered && collision.transform == playertr) { animator.SetTrigger("doorState"); StartCoroutine(bc.ButtonState()); } hasEntered = true; }