using UnityEngine;
using System.Collections;

public class FreeCam : MonoBehaviour {
	public float speed=10;
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
		
		transform.GetComponent<MouseLook>().sensitivityX = GameOptions.mouseSensivity;
		transform.GetComponent<MouseLook>().sensitivityY = GameOptions.mouseSensivity;
		
		if(Input.GetAxis("Vertical")>0)
		{
			transform.Translate(Vector3.forward*Time.deltaTime*speed);
		}
		
		if(Input.GetAxis("Vertical")<0)
		{
			transform.Translate(Vector3.back*Time.deltaTime*speed);
		}
		
		if(Input.GetAxis("Horizontal")>0)
		{
			transform.Translate(Vector3.right*Time.deltaTime*speed);
		}
		
		if(Input.GetAxis("Horizontal")<0)
		{
			transform.Translate(Vector3.left*Time.deltaTime*speed);
		}
	}
}
