using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class WoodBehaviour : MonoBehaviour {

	private float _timer;
	private float _destinationRotation;

	// Use this for initialization
	void Start () {
		_timer = 0f;
	}
	
	// Update is called once per frame
	void Update () {
		if (_timer <= 0f) {
			_destinationRotation = Random.Range (-30f, 30f);
			_timer = 1.3f;
		} else {
			_timer -= Time.deltaTime;
			transform.eulerAngles = transform.eulerAngles + new Vector3 (0f, _destinationRotation * Time.deltaTime, 0f);
		}
	}
}
