using UnityEngine;
using System.Collections;

public class SterowiecMovement : MonoBehaviour {

	float cooldown = 2.0f;
	float cooldownTime;

	public GameObject bomba;
	public GameObject spawner;

	float speed = 1.0f;
	Vector3 refVelocity;

	float turnDamp;
	float turnDampRef;

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void FixedUpdate () {
		return;
		//Movement
		float hor = Input.GetAxis("Horizontal");
		rigidbody.velocity = Vector3.SmoothDamp(rigidbody.velocity, speed * (transform.forward + transform.right * hor), ref refVelocity, 0.5f);
		turnDamp = Mathf.SmoothDamp(turnDamp, speed * hor, ref turnDampRef, 0.5f);
		rigidbody.transform.Rotate(0, turnDamp, 0);

		/*
		//Shooting
		if(Input.GetButtonDown("Jump") && cooldownTime < Time.time)
		{
			Instantiate(bomba, spawner.transform.position, bomba.transform.rotation);
			cooldownTime = Time.time + cooldown;
		}
		*/
	}
}
