Last active
April 15, 2017 05:53
-
-
Save gegagome/cfa815b43459b6768b86becc3fae7b73 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| IEnumerator VolumeChange (int stem, float initVol, float endVol, float time) { | |
| float timeElapsed = 0f; | |
| while (_stems[stem].volume != endVol) { | |
| _stems[stem].volume = Mathf.Lerp(initVol, endVol, timeElapsed * 2); | |
| timeElapsed += Time.deltaTime; | |
| Debug.Log("timeElapsed: " + timeElapsed + "\n" + "Time.deltaTime: " + Time.deltaTime + "\n" + "volume: " + _stems[stem].volume); | |
| yield return null; | |
| } | |
| _stems[stem].mute = !_stems[stem].mute; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment