Пример #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;
            }
        }
		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;
			}
		}