using UnityEngine;
using System.Collections;

public class UnicornAnimation : MonoBehaviour {
	public float rotate_amount=15;
	float change_time = 1f;
	float timer=0;
	// Update is called once per frame
	void Update () {
		timer += Time.deltaTime;
		if ( timer > change_time ) {
			timer = 0;
			rotate_amount = -rotate_amount;
		}
		transform.RotateAround(transform.position,transform.right,rotate_amount*Time.deltaTime);
	}
}
