protected void SecondFinger(GameFrameworkAction secondEvent) { m_SlapEffect.gameObject.SetActive(true); m_SlapEffect.Rewind(() => { m_SlapEffect.Rewind(() => { m_SlapEffect.Rewind(() => { m_SlapEffect.Stop(); m_SlapEffect.gameObject.SetActive(false); if (secondEvent != null) { secondEvent(); } }); }); }); }
protected override void InitBackGround(DifficultyType type) { base.InitBackGround(type); Vector3[] ban_1 = new Vector3[] { new Vector3(-619, -50, 0), new Vector3(-619, -50, 0), new Vector3(-154, -160, 0), }; Vector3[] ban_2 = new Vector3[] { new Vector3(-751, -50, 0), new Vector3(-265, -50, 0), new Vector3(-9, -160, 0), }; if (type == DifficultyType.Easy) { m_LeftBan.gameObject.SetActive(true); m_LeftBan_2.gameObject.SetActive(false); m_RightBan.gameObject.SetActive(false); //m_LeftBan.transform.localPosition = ban_1[0]; //m_RightBan.transform.localPosition = ban_1[1]; m_LeftBan.transform.localPosition = ban_1[0] + Vector3.up * 1080; m_PropTrs.transform.localPosition = ban_1[2]; m_BoomEffect.Rewind(() => { m_LeftBan.transform.DOLocalMoveY(m_LeftBan.transform.localPosition.y - 1080, 0.5f); }); Enter_PanBai(); } else if (type == DifficultyType.Trouble) { m_LeftBan.gameObject.SetActive(false); m_LeftBan_2.gameObject.SetActive(true); m_RightBan.gameObject.SetActive(true); m_LeftBan_2.transform.localPosition = ban_2[0] + Vector3.up * 1080; m_RightBan.transform.localPosition = ban_2[1] + Vector3.up * 1080; m_PropTrs.transform.localPosition = ban_2[2]; m_BoomEffect.Rewind(() => { m_LeftBan_2.transform.DOLocalMoveY(m_LeftBan_2.transform.localPosition.y - 1080, 0.5f); m_RightBan.transform.DOLocalMoveY(m_RightBan.transform.localPosition.y - 1080, 0.5f); }); Enter_PennySay_Trouble(); } }
private IEnumerator IE_CountDown(GameFrameworkAction OnComplate) { m_CountDownImage.sprite = m_ThreeSprite; m_CountDownImage.transform.DOScale(Vector3.one * 1.2f, 0.2f).SetLoops(2, LoopType.Yoyo).SetEase(Ease.Linear); GameEntry.Sound.PlayUISound((int)UISoundId.CountDown3); yield return(new WaitForSeconds(1)); m_CountDownImage.sprite = m_TwoSprite; m_CountDownImage.transform.DOScale(Vector3.one * 1.2f, 0.2f).SetLoops(2, LoopType.Yoyo).SetEase(Ease.Linear); GameEntry.Sound.PlayUISound((int)UISoundId.CountDown2); yield return(new WaitForSeconds(1)); m_CountDownImage.sprite = m_OneSprite; m_CountDownImage.transform.DOScale(Vector3.one * 1.2f, 0.2f).SetLoops(2, LoopType.Yoyo).SetEase(Ease.Linear); GameEntry.Sound.PlayUISound((int)UISoundId.CountDown1); yield return(new WaitForSeconds(1)); m_BackgroundObj.SetActive(false); m_GoObj.SetActive(true); m_GoAnimation.FirstFrame(); GameEntry.Sound.PlayUISound((int)UISoundId.GO); yield return(new WaitForSeconds(1)); m_GoAnimation.Rewind(() => { if (OnComplate != null) { OnComplate(); } gameObject.SetActive(false); m_IsComplate = true; GameEntry.Sound.PlayUISound((int)UISoundId.Begin); }); yield break; }