#pragma strict
var maxRotationRate : Vector3;
private var currentRotationRate : Vector3;

function Start () {
	
}

function Update () {
	transform.Rotate(currentRotationRate * Time.deltaTime);
}

function ApplyInputs (inputs : Vector2) {
	if(inputs.x > 0) {
		currentRotationRate.y = -maxRotationRate.x;
	}
	else if(inputs.x < 0) {
		currentRotationRate.y = maxRotationRate.x;
	}
	
	if(inputs.y > 0) {
		currentRotationRate.x = maxRotationRate.y;
	}
	else if(inputs.y < 0) {
		currentRotationRate.x = -maxRotationRate.y;
	}
}