using UnityEngine;
using System.Collections;

public class bombaMovement : MonoBehaviour {
	public float bonus=10;
	GameObject sterowiec;

	// Use this for initialization
	void Start ()
	{
		GameObject sterowiec = GameObject.FindGameObjectWithTag("Sterowiec");
		rigidbody.velocity = sterowiec.rigidbody.velocity + sterowiec.transform.forward*bonus;
	}
	
	// Update is called once per frame
	void Update () {
	
	}

	void OnTriggerEnter(Collider other)
	{
		Destroy(gameObject);
	}
}
