private void OnCollisionEnter2D(Collision2D collision) { PacMan pac = collision.gameObject.GetComponent <PacMan>(); if (pac != null) { pac.Die(); } else { SetDirection(); } }
private void OnCollisionEnter2D(Collision2D collision) { PacMan pac = collision.gameObject.GetComponent <PacMan>(); if (pac != null) { pac.Die(); } else { SetDirection(); } }