// Token: 0x06000897 RID: 2199 RVA: 0x00025C40 File Offset: 0x00023E40 public void ReGatherDynamicGo() { this.DisableGoList.Clear(); this.m_allTweens.Clear(); foreach (UIStateDesc uistateDesc in this.UIStateDescList) { foreach (GameObject gameObject in uistateDesc.SetToShowGameObjectList) { if (gameObject != null && !this.DisableGoList.Contains(gameObject)) { this.DisableGoList.Add(gameObject); } } foreach (TweenMain item in uistateDesc.TweenAnimationList) { if (!this.m_allTweens.Contains(item)) { this.m_allTweens.Add(item); } } } this.ReGatherColorChangeImageAndText(); foreach (UIStateDesc uistateDesc2 in this.UIStateDescList) { if (uistateDesc2.TweenAnimationList.Count != 0) { TweenMain tweenMain = null; float num = float.MinValue; foreach (TweenMain tweenMain2 in uistateDesc2.TweenAnimationList) { if (!(tweenMain2 == null)) { if (tweenMain2.style == TweenMain.Style.Once && tweenMain2.duration + tweenMain2.delay > num) { num = tweenMain2.duration + tweenMain2.delay; tweenMain = tweenMain2; } } } if (tweenMain != null) { tweenMain.OnFinished.RemoveAllListeners(); tweenMain.OnFinished.AddListener(new UnityAction(this.OnAllUIStateTweensFinished)); } } } this.isGathed = true; }
public ThumbnailGenerator(TweenMain Owner) { this.Owner = Owner; Owner.PreviewScrollBar.Scroll += PreviewScrollBar_Scroll; Owner.PreviewPicture.MouseLeave += PreviewPicture_MouseLeave; Owner.PreviewPicture.DoubleClick += PreviewPicture_DoubleClick; ThumbnailServices = new[] { new ThumbnailService("ImgUr", ImgUr_GetUrl, ImgUr_CreateImage), new ThumbnailService("DirectLink", DirectLink_GetUrl, DirectLink_CreateImage), new ThumbnailService("TwitPic", TwitPic_GetUrl, TwitPic_CreateImage), new ThumbnailService("yfrog", yfrog_GetUrl, yfrog_CreateImage), new ThumbnailService("Plixi(TweetPhoto)", Plixi_GetUrl, Plixi_CreateImage), new ThumbnailService("MobyPicture", MobyPicture_GetUrl, MobyPicture_CreateImage), new ThumbnailService("携帯百景", MovaPic_GetUrl, MovaPic_CreateImage), new ThumbnailService("はてなフォトライフ", Hatena_GetUrl, Hatena_CreateImage), new ThumbnailService("PhotoShare/bctiny", PhotoShare_GetUrl, PhotoShare_CreateImage), new ThumbnailService("img.ly", imgly_GetUrl, imgly_CreateImage), new ThumbnailService("Twitgoo", Twitgoo_GetUrl, Twitgoo_CreateImage), new ThumbnailService("youtube", youtube_GetUrl, youtube_CreateImage), new ThumbnailService("ニコニコ動画", nicovideo_GetUrl, nicovideo_CreateImage), new ThumbnailService("ニコニコ静画", nicoseiga_GetUrl, nicoseiga_CreateImage), new ThumbnailService("Pixiv", Pixiv_GetUrl, Pixiv_CreateImage), new ThumbnailService("flickr", flickr_GetUrl, flickr_CreateImage), new ThumbnailService("フォト蔵", Photozou_GetUrl, Photozou_CreateImage), new ThumbnailService("TwitVideo", TwitVideo_GetUrl, TwitVideo_CreateImage), new ThumbnailService("Piapro", Piapro_GetUrl, Piapro_CreateImage), new ThumbnailService("Tumblr", Tumblr_GetUrl, Tumblr_CreateImage), new ThumbnailService("ついっぷるフォト", TwipplePhoto_GetUrl, TwipplePhoto_CreateImage), new ThumbnailService("mypix/shamoji", mypix_GetUrl, mypix_CreateImage), new ThumbnailService("ow.ly", Owly_GetUrl, Owly_CreateImage), new ThumbnailService("vimeo", Vimeo_GetUrl, Vimeo_CreateImage), new ThumbnailService("cloudfiles", CloudFiles_GetUrl, CloudFiles_CreateImage), new ThumbnailService("instagram", instagram_GetUrl, instagram_CreateImage), new ThumbnailService("pikubo", pikubo_GetUrl, pikubo_CreateImage), new ThumbnailService("FourSquare", Foursquare_GetUrl, Foursquare_CreateImage), new ThumbnailService("TINAMI", Tinami_GetUrl, Tinami_CreateImage), new ThumbnailService("Twimg", Twimg_GetUrl, Twimg_CreateImage), new ThumbnailService("TwitrPix", TwitrPix_GetUrl, TwitrPix_CreateImage), new ThumbnailService("Pckles", Pckles_GetUrl, Pckles_CreateImage), new ThumbnailService("via.me", ViaMe_GetUrl, ViaMe_CreateImage), new ThumbnailService("tuna.be", TunaBe_GetUrl, TunaBe_CreateImage), new ThumbnailService("Path.com", PathCom_GetUrl, PathCom_CreateImage), }; }
//todo alpha设置与硬切在起始或结束时刻上的不平滑 public void SetUIState(string stateName, System.Action onEnd = null, bool refreshTheSameState = true) { var uiStateDesc = GetUIStateDesc(stateName); if (uiStateDesc == null) { Debug.LogError(string.Format("the UIStateController in {0} don't has state {1}", name, stateName)); return; } if (!m_hasCollect) { CollectResources(); } //隐藏所有物体 foreach (var go in m_allGameObjectActiveOrNot) { go.SetActive(false); } //enable所有tweener foreach (var tweener in m_allTweeners) { tweener.enabled = false; } //显示当前state的物体 foreach (var go in uiStateDesc.m_activeObjects) { go.SetActive(true); } //设置物体的颜色 foreach (var uiColorDesc in uiStateDesc.m_uiColorDescs) { if (uiColorDesc.m_gameObject != null) { Image image = uiColorDesc.m_gameObject.GetComponent <Image>(); if (image != null) { image.color = uiColorDesc.m_color; } Text text = uiColorDesc.m_gameObject.GetComponent <Text>(); if (text != null) { text.color = uiColorDesc.m_color; } } } bool hasTweeners = uiStateDesc.m_tweeners != null && uiStateDesc.m_tweeners.Count != 0; var lastState = m_curState; m_curState = stateName; if (!hasTweeners) { if (onEnd != null) { onEnd(); } } else { if (lastState == m_curState && !refreshTheSameState) { if (onEnd != null) { onEnd(); } } else { var tweeners = uiStateDesc.m_tweeners; foreach (var tweener in tweeners) { //重置到起点 tweener.ResetToBeginning(); //移除所有事件 tweener.OnFinished.RemoveAllListeners(); } //找到最长的tweener TweenMain longestTweener = null; float longestDuration = 0; foreach (var tweener in tweeners) { if (tweener.delay + tweener.duration > longestDuration) { longestDuration = tweener.delay + tweener.duration; longestTweener = tweener; } } //设置回调事件 longestTweener.OnFinished.AddListener(() => { if (onEnd != null) { onEnd(); } }); //播放所有tweener foreach (var tweener in tweeners) { tweener.enabled = true; tweener.PlayForward(); } } } }