using UnityEngine;
using System.Collections;

public class ShakeStartButton : MonoBehaviour
{
	[SerializeField]
	float min_interval = .3f;
	[SerializeField]
	float max_interval = 5f;
	[SerializeField]
	Vector3 shakePosAmount = new Vector3 (1.5f, 1.5f, 0);
	[SerializeField]
	Vector3 shakeScaleAmount = new Vector3 (1f, 1f, 0);
	[SerializeField]
	float shakeDuration = .3f;

	void Start () {
		Shake ();
	}

	void Shake() {
		iTween.ShakePosition (gameObject, shakePosAmount, shakeDuration);
		iTween.ShakeScale(gameObject, shakeScaleAmount, shakeDuration);
		Invoke("Shake", Random.Range(min_interval, max_interval));
	}
}
