using UnityEngine;
using System.Collections;

// for demos
public class Rotator : MonoBehaviour {

	[SerializeField] Vector3 axe = Vector3.up;
	[SerializeField] float speed = 1f; // angles per second

	Transform thisTransform;

	public void SetParams(float newSpeed, Vector3 newAxe)
	{
		speed = newSpeed;
		axe = newAxe;
	}

	public void SetParams(float newSpeed)
	{
		speed = newSpeed;
	}

	void Start ()
	{
		thisTransform = transform;
	}

	void Update ()
	{
		thisTransform.Rotate (axe, speed * Time.deltaTime);
	}
}
