﻿using UnityEngine;
using System.Collections;

public class RainSounds : MonoBehaviour {

	// Use this for initialization
	void Start () {

	}
	
	// Update is called once per frame
	void Update () {

		if (Time.time <= 2.5f)
		{
			audio.volume = 0.1f * Time.deltaTime;
			//audio.Play();
		}

			audio.volume += 0.1f * Time.deltaTime;
			//audio.Play();


	if (Time.time >= 20.0f)
		{
			audio.volume -= 0.1f * Time.deltaTime;
			//audio.Play();
			if (audio.volume <= 0.0f)
			{
				Destroy(gameObject);
			}
		}
	}

}
