public IEnumerator timeSample(FloatUnityEvent callback)
    {
        while (true)
        {
            yield return(new WaitForSeconds(1f));

            Debug.Log($"timeSample {videoTime}");
            callback.Invoke(videoTime);
        }
    }
    private void GetFloatInputChange(FloatUnityEvent eventToFire, string inputAxisName, ref float lastInputValue)
    {
        float currentInputValue = Input.GetAxis(inputAxisName);

        if (lastInputValue != currentInputValue)
        {
            lastInputValue = currentInputValue;

            if (eventToFire != null)
            {
                eventToFire.Invoke(currentInputValue);
            }
        }
    }
示例#3
0
/*AUTO SCRIPT*/ public void RemoveListener(FloatUnityEvent listener)
/*AUTO SCRIPT*/ {
/*AUTO SCRIPT*/ unityEventListeners.TryRemove(listener);
/*AUTO SCRIPT*/ }
示例#4
0
/*AUTO SCRIPT*/
/*AUTO SCRIPT*/ public void AddListener(FloatUnityEvent listener)
/*AUTO SCRIPT*/ {
/*AUTO SCRIPT*/ unityEventListeners.TryAdd(listener);
/*AUTO SCRIPT*/ }