using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class Bonus : MonoBehaviour {

	public void OnTriggerEnter2D(Collider2D other)
	{
		if (other.name == "Player") {
			((PlayerScript)other.gameObject.GetComponent (typeof(PlayerScript))).addBonus (true);
			Destroy (this.gameObject);
		}
	}
}
