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

public class SolarSource : MonoBehaviour {

	[SerializeField] Transform player;
	Transform thisTF;
	SailSpeed sailScript;

	void Start () 
	{
		thisTF = GetComponent<Transform> ();
		sailScript = player.GetComponent<SailSpeed> ();
	}
	

	void Update () 
	{
		sailScript.AddSpeed (player.position - thisTF.position);
	}
}
