private void OnTriggerEnter2D(Collider2D other) { if (other.CompareTag("CoinCircle")) { Vector3 position = other.GetComponent <Transform>().position; if (GetComponentInParent <DrawLine>().drawing == true && !swipeController.coinPositions.Contains(position)) { swipeController.AddCoin(position); } } }