private IEnumerator NextFileAfterDelay()
        {
            while (true)
            {
                float timeRemainingSeconds = timeUntilNextPhotoSeconds;

                while (timeRemainingSeconds > 0.0f)
                {
                    timer.enabled = true;
                    float percentComplete = 1.0f - (timeRemainingSeconds / timeUntilNextPhotoSeconds);
                    timer.fillAmount      = percentComplete;
                    timeRemainingSeconds -= Time.deltaTime;
                    yield return(null);
                }

                MediaPlayerEventDispatcher.RaiseNextFile();
            }
        }
Пример #2
0
        public void OnPointerClick(PointerEventData eventData)
        {
            switch (eventType)
            {
            case Event.ExitMedia:
                MediaPlayerEventDispatcher.RaiseExitMedia();
                break;

            case Event.NextFile:
                MediaPlayerEventDispatcher.RaiseNextFile();
                break;

            case Event.PreviousFile:
                MediaPlayerEventDispatcher.RaisePreviousFile();
                break;

            default:
                Debug.LogError("Unsupported Event: " + eventType);
                break;
            }
        }