private void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.tag == GameController.PlayerTag) { GameController.FindInstance().EndGameAsFailure(); } }
private void Awake() { goalTrigger = GetComponent <Collider2D>(); gameController = GameController.FindInstance(); }