// Token: 0x0600204B RID: 8267 RVA: 0x003D3B18 File Offset: 0x003D1D18 public void Update() { if (this.PassInit > 0) { this.PassInit -= 1; if (this.PassInit == 0) { int num = Mathf.Clamp(this.MaxScrollItemCount, 0, 3); this.TechItem = new UITechInstitute._TechItem[num]; this.m_itemView.IntiScrollPanel(285f, 0f, 0f, this.tmplist, num, this); for (int i = 0; i < this.MaxScrollItemCount; i++) { this.tmplist.Add(227f); } this.m_itemView.AddNewDataHeight(this.tmplist, true, true); this.m_itemView.gameObject.SetActive(true); this.ScroContent = this.m_itemView.transform.GetChild(0).GetComponent <RectTransform>(); float num2 = this.ScroContent.sizeDelta.y - 285f; float num3 = GameConstants.ConvertBytesToFloat(this.GUIM.TechKindSaved, 1); if (num2 < num3 && this.GUIM.TechKindSaved[0] > 0) { byte[] techKindSaved = this.GUIM.TechKindSaved; int num4 = 0; techKindSaved[num4] -= 1; num3 = num2; } this.m_itemView.GoTo((int)this.GUIM.TechKindSaved[0], num3); this.TextRefresh(); } } else { for (int j = 0; j < this.TechItem.Length; j++) { for (int k = 0; k < this.TechItem[j].Research.Length; k++) { if (this.TechItem[j].Research[k].gameObject.activeSelf) { if (this.RotTime <= 1.3f) { Quaternion localRotation = this.TechItem[j].Research[k].localRotation; Vector3 eulerAngles = localRotation.eulerAngles; if (this.RotTime <= 0.5f) { eulerAngles.z = EasingEffect.Linear(this.RotTime, 0f, 180f, 0.5f); } else { eulerAngles.z = 180f; } localRotation.eulerAngles = eulerAngles; this.TechItem[j].Research[k].localRotation = localRotation; } else if (this.RotTime <= 2.6f) { float num5 = this.RotTime - 1.3f; Quaternion localRotation2 = this.TechItem[j].Research[k].localRotation; Vector3 eulerAngles2 = localRotation2.eulerAngles; if (num5 <= 0.5f) { eulerAngles2.z = EasingEffect.Linear(num5, 180f, 180f, 0.5f); } else { eulerAngles2.z = 360f; } localRotation2.eulerAngles = eulerAngles2; this.TechItem[j].Research[k].localRotation = localRotation2; } else { this.RotTime = 0f; } this.RotTime += Time.smoothDeltaTime; return; } } } } }
// Token: 0x06001198 RID: 4504 RVA: 0x001ECDD8 File Offset: 0x001EAFD8 public bool UpdateRun(float delta) { if (this.MotionTransform == null) { return(false); } if (this.Type == WorldMode.Wild) { if (this.DownUp == 255) { Vector3 source = this.Source; if (this.Change < 0f) { source.y = this.Source.y; } else { source.y = this.Source.y + this.Change; } this.MotionTransform.position = source; this.Builds[(int)this.UpdateIndex].Update(3); this.MotionIndex = -1; this.DownUp = 0; return(false); } if (this.DeltaTime > this.WaitTime) { Vector3 source2 = this.Source; source2.y = EasingEffect.Linear(this.DeltaTime - this.WaitTime, this.Source.y, this.Change, this.TotalTime - this.WaitTime); this.MotionTransform.position = source2; } } else { float d = EasingEffect.Linear(this.DeltaTime, this.Source.x, this.Change, this.TotalTime); this.MotionTransform.GetChild((int)this.SpriteEffectIdx).localScale = Vector3.one * d; } this.DeltaTime += delta; if (this.TotalTime < this.DeltaTime) { if (this.Type == WorldMode.Wild) { this.Source.y = this.Source.y + this.Change; this.MotionTransform.position = this.Source; if (this.DownUp == 1) { this.Builds[(int)this.UpdateIndex].Update(3); this.Builds[(int)this.UpdateIndex].Update(0); this.Source = this.MotionTransform.position; this.Source.y = this.Source.y - 32f; this.MotionTransform.position = this.Source; this.Change = 32f; this.DeltaTime = 0f; this.TotalTime = 1f; this.WaitTime = 0f; this.DownUp = 0; return(true); } this.ShowBuildCompleteEffect(); this.Builds[(int)this.UpdateIndex].Update(3); this.Builds[(int)this.UpdateIndex].Update(5); this.UpdateMapSprite(255, 9); } else { this.Source.Set(this.Change, this.Change, this.Change); Transform motionTransform = this.MotionTransform; byte spriteEffectIdx; this.SpriteEffectIdx = (spriteEffectIdx = this.SpriteEffectIdx) + 1; motionTransform.GetChild((int)spriteEffectIdx).localScale = this.Source; if (this.SpriteEffectIdx <= 4) { this.Source.Set(1f, 1f, 1f); this.MotionTransform.GetChild((int)this.SpriteEffectIdx).localScale = this.Source; this.MotionTransform.GetChild((int)this.SpriteEffectIdx).gameObject.SetActive(true); this.DeltaTime = 0f; this.TotalTime = 0.25f; return(true); } } this.MotionTransform = null; return(false); } return(true); }
// Token: 0x06002425 RID: 9253 RVA: 0x0041E8B0 File Offset: 0x0041CAB0 public void Update() { if (this.BackRect == null) { return; } if (this.MapHud != null) { this.MapHud.Update(); } this.CheckQueue(); float num = 0.5f; if (this.BackRect == null || !this.BackRect.gameObject.activeSelf) { return; } Vector2 sizeDelta = this.BackRect.sizeDelta; Vector2 anchoredPosition = this.BackRect.anchoredPosition; float unscaledDeltaTime = Time.unscaledDeltaTime; if (this.bFirstShow) { sizeDelta.y = 40f; sizeDelta.x = EasingEffect.Linear(this.FirstShowTime, 0f, this.BackMaxWidth, this.MaxFirstShowTime); this.FirstShowTime += unscaledDeltaTime; if (this.FirstShowTime > this.MaxFirstShowTime) { this.bFirstShow = false; this.FadeoutTime = 0f; sizeDelta.x = this.BackMaxWidth; } this.BackRect.sizeDelta = sizeDelta; return; } int num2 = (int)((float)this.MinBackHeight - sizeDelta.y); int num3 = (int)((float)this.DesirePos - anchoredPosition.y); if (num2 > 0) { sizeDelta.y += (float)this.MinBackHeight * unscaledDeltaTime * 5f; if (sizeDelta.y > (float)this.MinBackHeight) { sizeDelta.y = (float)this.MinBackHeight; } this.BackRect.sizeDelta = sizeDelta; } if (num3 > 0) { anchoredPosition.y += (float)this.MinBackHeight * unscaledDeltaTime * 5f; if (anchoredPosition.y > (float)this.DesirePos) { anchoredPosition.y = (float)this.DesirePos; } this.BackRect.anchoredPosition = anchoredPosition; } for (int i = 0; i < 3; i++) { this.HudMessage[i].Update(); } num2 = (int)((float)this.MinBackHeight - sizeDelta.y); if (num2 < 0) { sizeDelta.y -= (float)this.MinBackHeight * unscaledDeltaTime * 5f; if (sizeDelta.y < (float)this.MinBackHeight) { sizeDelta.y = (float)this.MinBackHeight; } this.BackRect.sizeDelta = sizeDelta; } if (num3 < 0) { anchoredPosition.y -= (float)this.MinBackHeight * unscaledDeltaTime * 5f; if (anchoredPosition.y < (float)this.DesirePos) { anchoredPosition.y = (float)this.DesirePos; } this.BackRect.anchoredPosition = anchoredPosition; } if (this.UseCount == 0 && num2 == 0) { this.BackCanvasGroup.alpha = 1f - this.FadeoutTime / num; this.FadeoutTime += unscaledDeltaTime; if (this.FadeoutTime > num) { sizeDelta.Set(0f, this.BackRect.sizeDelta.y); this.BackRect.sizeDelta = sizeDelta; anchoredPosition.y = this.BackOriPos.y; this.BackRect.anchoredPosition = anchoredPosition; this.BackRect.gameObject.SetActive(false); } } }