using UnityEngine;
using System.Collections;

public class ObjectRotator : MonoBehaviour {

    public float MaxInitialRotate = 360.0f;
    public float MaxRotationSpeed = 10.0f;
    public float MinRotationSpeed = 3.0f;

    private Quaternion Rotate_Around;
    private float RotationSpeed;
	// Use this for initialization
	void Start () {

        //Rotate_Around = Quaternion.Euler(0, Random.Range(0.0f, MaxInitialRotate), 0);
        transform.Rotate(0, Random.Range(0.0f, MaxInitialRotate), 0);

        RotationSpeed = Random.Range(MinRotationSpeed, MaxRotationSpeed);

        if (Random.Range(0, 2) == 0)
            RotationSpeed *= -1;

        //Rotate_Around = Quaternion.Euler(0, 0.25f, 0);

	}
	
	// Update is called once per frame
    void FixedUpdate()
    {
        transform.Rotate(0, RotationSpeed * Time.deltaTime, 0);
    }
	void Update () {
	}
}
