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

namespace uTools
{
    public class uTweenAudioVolume : uTweenValue
    {
        AudioSource audioSource;

        public AudioSource AudioSource
        {
            get
            {
                if (null == audioSource)
                {
                    audioSource = GetComponent<AudioSource>();
                }
                return audioSource;
            }
        }

        protected override void ValueUpdate(float value, bool isFinished)
        {
            AudioSource.volume = value;
        }
    }
}