VAUVRTKReverbTimeText.cs 696 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
using UnityEngine;
using System.Collections;
using VA;
using UnityEngine.UI;
using System;


public class VAUVRTKReverbTimeText : MonoBehaviour {

    private VANet _VA = null;
    private Text reverbTimeText;
    private VAUListener listener;
    void Start()
    {
        _VA = VAUAdapter.VA;
        reverbTimeText = GetComponent<Text>();
        listener = FindObjectOfType<VAUListener>();
        listener.ReverbTimeChanged += Listener_ReverbTimeChanged;
        reverbTimeText.text = 0f + "s";
    }

    private void Listener_ReverbTimeChanged(double reverbTime)
    {
        reverbTime = Math.Round(reverbTime, 3);
        reverbTimeText.text = reverbTime + "s";
    }

    

    
}