using UnityEngine;

public class Obstacle : MonoBehaviour
{
	public Vector2 velocity = new Vector2(-4, 0);

	// Use this for initialization
	void Start()
	{
		Rigidbody rb = GetComponent<Rigidbody>();
		GetComponent<Rigidbody2D>().velocity = velocity;
	}
	private void OnTriggerEnter2D (Collider2D other)
	{
		if (other.GetComponent<Player> () != null) {
			GameController.instance.GameScore ();	
		}
	}
}