| | |
| | | |
| | | waveText = transform.Find("Text_Wave").GetComponent<Text>(); |
| | | scoreText = transform.Find("Text_Score").GetComponent<Text>(); |
| | | scoreText.text = ""; |
| | | waveText.text = ""; |
| | | waveText.gameObject.SetActive(false); |
| | | scoreText.gameObject.SetActive(false); |
| | | |
| | | image_NewRecord = transform.Find("Image_NewRecord").gameObject; |
| | | image_NewRecord.SetActive(false); |
| | | LoadLargeData(hScore); |
| | | |
| | | Transform ts = transform.Find("Images"); |
| | | |
| | | Sequence agentTweenSeq = DOTween.Sequence(); |
| | | //先出现 |
| | | Image tsTiele = transform.Find("Image_Tiele").GetComponent<Image>(); |
| | | agentTweenSeq.Append(tsTiele.transform.DOScale(Vector3.one, 0.2f));//变化图片大小 |
| | | agentTweenSeq.Join(tsTiele.DOFade(1, 0.3f)); |
| | | |
| | | agentTweenSeq.Append(ts.DOScale(Vector3.one, 0.2f));//变化图片大小 |
| | | Image Image1 = transform.Find("Image1").GetComponent<Image>(); |
| | | agentTweenSeq.Append(Image1.transform.DOScale(Vector3.one, 0.2f));//变化图片大小 |
| | | agentTweenSeq.Join(Image1.DOFade(1, 0.2f)); |
| | | agentTweenSeq.Join(waveText.DOText(waveInfo, 0.2f)); |
| | | |
| | | agentTweenSeq.Append(ts.DOScale(new Vector3(1.7f, 1.7f, 1.7f), 0.2f));//变化图片大小 |
| | | agentTweenSeq.Append(ts.DOScale(Vector3.one, 0.2f));//变化图片大小 |
| | | agentTweenSeq.Append(ts.DOScale(new Vector3(1.2f, 1.2f, 1.2f), 0.2f));//变化图片大小 |
| | | agentTweenSeq.Append(ts.DOScale(Vector3.one, 0.2f));//变化图片大小 |
| | | Image Image2 = transform.Find("Image2").GetComponent<Image>(); |
| | | agentTweenSeq.Append(Image2.transform.DOScale(Vector3.one, 0.2f));//变化图片大小 |
| | | agentTweenSeq.Join(Image2.DOFade(1, 0.2f)); |
| | | |
| | | agentTweenSeq.AppendCallback(StartLoadLargeData); |
| | | agentTweenSeq.Append(DOTween.To(delegate (float value) |
| | | |
| | | Image Image3 = transform.Find("Image3").GetComponent<Image>(); |
| | | agentTweenSeq.Append(Image3.transform.DOScale(Vector3.one, 0.2f));//变化图片大小 |
| | | agentTweenSeq.Join(Image3.DOFade(1, 0.2f)); |
| | | agentTweenSeq.Join(DOTween.To(delegate (float value) |
| | | { |
| | | var temp = Math.Floor(value); |
| | | scoreText.text = temp + ""; |
| | | }, 0, myScore, 1.0f)); |
| | | |
| | | tsLight = transform.Find("ImageLight"); |
| | | Image ImageLight = tsLight.GetComponent<Image>(); |
| | | agentTweenSeq.Join(ImageLight.transform.DOScale(Vector3.one, 0.2f));//变化图片大小 |
| | | agentTweenSeq.Join(ImageLight.DOFade(1, 0.2f).OnComplete(RotateLight)); |
| | | //agentTweenSeq.AppendCallback(RotateLight); |
| | | |
| | | agentTweenSeq.AppendCallback(TextDoTweenFinish); |
| | | agentTweenSeq.Append(waveText.DOText(waveInfo, 0.2f)); |
| | | } |
| | | |
| | | bool isRotate = false; |
| | | float offect = 0; |
| | | /// <summary> |
| | | /// LateUpdate is called every frame, if the Behaviour is enabled. |
| | | /// It is called after all Update functions have been called. |
| | | /// </summary> |
| | | void LateUpdate() |
| | | { |
| | | if (isRotate) |
| | | { |
| | | offect += Time.deltaTime; |
| | | tsLight.localRotation = Quaternion.Euler(0, 0, offect * 30); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | protected void StartLoadLargeData() |
| | | { |
| | | scoreText.gameObject.SetActive(true); |
| | | LoadLargeData(hScore); |
| | | StartCoroutine(PlayerItemDoTween()); |
| | | } |
| | | |
| | |
| | | /// <returns></returns> |
| | | IEnumerator PlayerItemDoTween() |
| | | { |
| | | yield return 1f; |
| | | //yield return 1f; |
| | | // FinalPanelItem[] allItems = transform.Find("Scroller/Container").GetComponentsInChildren<FinalPanelItem>(); |
| | | // for (int i = 0; i < allItems.Length; i++) |
| | | // { |
| | | // allItems[i].SetPos(); |
| | | // } |
| | | for (int i = 0; i < 8; i++) |
| | | { |
| | | allItemLis[i].SetPos(); |
| | | } |
| | | |
| | | yield return new WaitForEndOfFrame(); |
| | | scrollerCanvasGroup.alpha = 1; |
| | |
| | | for (int i = 0; i < 8; i++) |
| | | { |
| | | allItemLis[i].PlayDoTween(0.1f); |
| | | yield return new WaitForSeconds(0.1f); |
| | | yield return new WaitForSeconds(0.07f); |
| | | } |
| | | image_HScore.SetActive(true); |
| | | |
| | |
| | | } |
| | | |
| | | closeBtn.interactable = true; |
| | | } |
| | | |
| | | Transform tsLight; |
| | | /// <summary> |
| | | /// 光出现后开始旋转 |
| | | /// </summary> |
| | | protected void RotateLight() |
| | | { |
| | | isRotate = true; |
| | | offect = 0; |
| | | //Transform ImageLight = transform.Find("ImageLight"); |
| | | //ImageLight.DORotate(new Vector3(0, 180, 0), 1.0f).SetLoops(-1,LoopType.Incremental); |
| | | } |
| | | |
| | | List<FinalPanelItem> allItemLis;//新生成的排行榜 |
| | |
| | | { |
| | | allItemLis[i].SetData(_data[i]); |
| | | } |
| | | |
| | | for (int i = 0; i < 8; i++) |
| | | { |
| | | allItemLis[i].SetPos(); |
| | | } |
| | | |
| | | } |
| | | |
| | | #region EnhancedScroller Handlers |