using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CoinPickup : MonoBehaviour {
public int pointToAdd;
private void OnTriggerEnter2D(Collider2D other)
{
if (other.GetComponent<PlayerController>() == null)
return;
ScoreManager.AddPoints(pointToAdd);
Destroy(gameObject);
}
}