// Token: 0x06012121 RID: 74017 RVA: 0x004A8C80 File Offset: 0x004A6E80 private void OnNoticeShowTweenFinished() { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_OnNoticeShowTweenFinished_hotfix != null) { this.m_OnNoticeShowTweenFinished_hotfix.call(new object[] { this }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; float num = this.m_noticeText.preferredWidth - this.m_noticeTextInitWidth; if (num <= 0f) { this.m_delayHideNoticeCoroutine = base.StartCoroutine(this.DelayHideNotice(1f, 0f)); return; } float num2 = num / 100f; this.m_delayHideNoticeCoroutine = base.StartCoroutine(this.DelayHideNotice(1f, num2)); this.m_noticeMoveTween.delay = 0f; this.m_noticeMoveTween.duration = num2; this.m_noticeMoveTween.from = (this.m_noticeMoveTween.to = this.m_noticeTextInitPos); TweenPos noticeMoveTween = this.m_noticeMoveTween; noticeMoveTween.to.x = noticeMoveTween.to.x - num; this.m_noticeMoveTween.ResetToBeginning(); this.m_noticeMoveTween.PlayForward(); }
void Start() { AnimPos = GetComponent<TweenPos>(); AnimColor = GetComponent<TweenSpriteColor>(); AnimPos.Play(); AnimColor.Play(); InitState = transform.parent; }
// NEED TO MAKE THIS A COROUTINE public void CloseSettingsMenu() { TweenPos.Tween(this.menuOverlayPanel.gameObject, .5f, new Vector3(Screen.width / 2, Screen.height / 2, 0), new Vector3(0, 0, 0), TweenMain.Style.Once, TweenMain.Method.EaseIn, null, Space.World); TweenScale.Tween(this.menuOverlayPanel.gameObject, .5f, new Vector3(1, 1, 1), new Vector3(0, 0, 0), TweenMain.Style.Once, TweenMain.Method.EaseIn, null); StartCoroutine(PF_GamePlay.Wait(.75f, () => { menuOverlayPanel.gameObject.SetActive(false); ToggleOpenCloseButtons(); })); }
public static void PosTween(GameObject go, float duration, Vector3 pos, int style = 0, int method = 0, LuaFunction finished = null, bool newObj = true) { UnityAction action = () => { if (finished != null) { finished.Call(); } }; TweenPos.Tween(go, duration, pos, (TweenMain.Style)style, (TweenMain.Method)method, (finished != null)?action:null, newObj); }
void InitTween() { for (int i = 0; i < LayerContainerList.Count; i++) { //UILayerContainer<AnimEntry> layerContainer = LayerContainerList[i]; UILayerContainerAnim layerContainer = LayerContainerList[i]; for (int j = 0; j < layerContainer.ChildList.Count; j++) { AnimEntry animEntry = layerContainer.ChildList[j]; UIAnimType animType = animEntry.Type; if (animType == UIAnimType.Position) { animEntry.tween = TweenPos.Tween(gameObject, animEntry.Duration, animEntry.To); } if (animType == UIAnimType.Scale) { animEntry.tween = TweenScale.Tween(gameObject, animEntry.Duration, animEntry.To); } if (animType != UIAnimType.None) { animEntry.tween.tweenFactor = 0; animEntry.tween.enabled = false; } /* * // 在这里继续添加其他类型的 */ // 这里就是让ChildList按顺序去播放 if (j > 0) { AnimEntry preAnimEntry = layerContainer.ChildList[j - 1]; AddTweenListener(preAnimEntry, animEntry); } // 添加回调,在最后一个动作回调 if (j == layerContainer.ChildList.Count - 1) { AnimEntry lastAnimEntry = layerContainer.ChildList[j]; AddLastTweenCallback(layerContainer.Type, lastAnimEntry); } } } }
public void OpenSettingsMenu() { // THIS BREAKS IF THE GO IS DISABLED!!! //Tween.Tween(this.menuOverlayPanel.gameObject, .001f, Quaternion.Euler(0,0,0) , Quaternion.Euler(0,0,15f), TweenMain.Style.PingPong, TweenMain.Method.EaseIn, null); //new Vector3(Screen.width/2, Screen.height/2, 0) menuOverlayPanel.gameObject.SetActive(true); TweenPos.Tween(this.menuOverlayPanel.gameObject, .001f, this.menuOverlayPanel.transform.position, new Vector3(0, Screen.height, 0), TweenMain.Style.Once, TweenMain.Method.Linear, null, Space.World); TweenScale.Tween(this.menuOverlayPanel.gameObject, .001f, new Vector3(1, 1, 1), new Vector3(0, 0, 0), TweenMain.Style.Once, TweenMain.Method.EaseIn, null); TweenPos.Tween(this.menuOverlayPanel.gameObject, .5f, new Vector3(0, 0, 0), new Vector3(Screen.width / 2, Screen.height / 2, 0), TweenMain.Style.Once, TweenMain.Method.EaseIn, null, Space.World); TweenScale.Tween(this.menuOverlayPanel.gameObject, .5f, new Vector3(0, 0, 0), new Vector3(1, 1, 1), TweenMain.Style.Once, TweenMain.Method.EaseIn, null); this.activeTitleId.text = PlayFab.PlayFabSettings.TitleId; ToggleOpenCloseButtons(); }
public void TurnOffArrows(UnityEvent callback = null) { DeselectArrows(); DisablePulsingButtons(); TweenPos.Tween(this.ArrowGroup.gameObject, .333f, this.initialPos, () => { this.Arrow1.btn.interactable = false; this.Arrow2.btn.interactable = false; this.Arrow3.btn.interactable = false; this.Arrow1.currentState = AnimationStates.Off; this.Arrow2.currentState = AnimationStates.Off; this.Arrow3.currentState = AnimationStates.Off; if (callback != null) { callback.Invoke(); } }, Space.World); }
public void TurnOnArrows(UnityEvent callback = null) { //Debug.Log(this.ArrowGroup.rect.width); this.selectedSlot = null; TweenPos.Tween(this.ArrowGroup.gameObject, .333f, new Vector3(445, 30, 0), () => { this.Arrow1.btn.interactable = true; this.Arrow1.currentState = AnimationStates.On; this.Arrow2.btn.interactable = true; this.Arrow2.currentState = AnimationStates.On; this.Arrow3.btn.interactable = true; this.Arrow3.currentState = AnimationStates.On; if (callback != null) { callback.Invoke(); } }, Space.Self); }
// Token: 0x06012120 RID: 74016 RVA: 0x004A8B0C File Offset: 0x004A6D0C private void ShowNextNotice() { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_ShowNextNotice_hotfix != null) { this.m_ShowNextNotice_hotfix.call(new object[] { this }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; if (this.m_playerContext.GetGetWaitingNoticeStringListCount() == 0) { return; } this.m_currentNoticeText = this.m_playerContext.GetWaitingNoticeStringListFirstNotice(); base.gameObject.SetActive(true); if (this.m_delayHideNoticeCoroutine != null) { base.StopCoroutine(this.m_delayHideNoticeCoroutine); this.m_delayHideNoticeCoroutine = null; } if (this.m_noticeText.gameObject.activeInHierarchy) { this.m_noticeText.SetContent(this.m_currentNoticeText.text); } this.m_noticeShowTween.from = (this.m_noticeShowTween.to = this.m_noticeTextInitPos); float height = this.m_noticeText.rectTransform.rect.height; TweenPos noticeShowTween = this.m_noticeShowTween; noticeShowTween.from.y = noticeShowTween.from.y - height; this.m_noticeShowTween.duration = height / 100f; this.m_noticeShowTween.ResetToBeginning(); this.m_noticeMoveTween.ResetToBeginning(); this.m_noticeMoveTween.enabled = false; this.m_noticeShowTween.PlayForward(); this.m_playerContext.SetIsShowingNoticeFlag(true); }