Пример #1
0
        private void UpdateBuild(ref UploadingBuild build)
        {
            switch (build.status)
            {
            case UploadingBuildStatus.Authorizing:
            case UploadingBuildStatus.Authorized:
                AsyncProgressBar.Display(UploadingBuildsMonitor.s_Content.m_ProgressBarText.text, 0f);
                break;

            case UploadingBuildStatus.Uploading:
            {
                ValueSmoother progressSmoother = this.GetProgressSmoother(build.url);
                progressSmoother.SetTargetValue(build.progress);
                AsyncProgressBar.Display(UploadingBuildsMonitor.s_Content.m_ProgressBarText.text, progressSmoother.GetSmoothValue());
                break;
            }

            case UploadingBuildStatus.Uploaded:
            case UploadingBuildStatus.UploadFailed:
                UploadingBuildsUtility.RemoveUploadingBuild(build.displayName);
                AsyncProgressBar.Clear();
                this.SyncToState();
                break;

            default:
                Debug.LogError("Unhandled enum");
                break;
            }
        }
Пример #2
0
        private ValueSmoother GetProgressSmoother(string url)
        {
            ValueSmoother valueSmoother;

            this.m_ProgressSmoothers.TryGetValue(url, out valueSmoother);
            if (valueSmoother == null)
            {
                valueSmoother = new ValueSmoother();
                this.m_ProgressSmoothers[url] = valueSmoother;
            }
            return(valueSmoother);
        }
		private ValueSmoother GetProgressSmoother(string url)
		{
			ValueSmoother valueSmoother;
			this.m_ProgressSmoothers.TryGetValue(url, out valueSmoother);
			if (valueSmoother == null)
			{
				valueSmoother = new ValueSmoother();
				this.m_ProgressSmoothers[url] = valueSmoother;
			}
			return valueSmoother;
		}