using UnityEngine;
using System.Collections;

public class Rotator : MonoBehaviour
{
    public float Rate = 2;
    public bool IsContinuos = false;
    void Update()
    {
        if (IsContinuos)
            transform.Rotate(0, 0, Rate);
        else
            transform.Rotate(0, 0, 0.4f + 2 * Mathf.Abs(Mathf.Sin(Time.time * 3)));
    }
}
