public override void OnPlayOpenWindowAniComplete() { base.OnPlayOpenWindowAniComplete(); MatchAni.clipName = "CircleAnimation"; MatchAni.playDirection = AnimationOrTween.Direction.Forward; MatchAni.onFinished.Clear(); MatchAni.Play(true, false); }
/// <summary> /// 显示菜单 /// </summary> public void Show() { // 如果正在显示,返回 if (show) { return; } show = true; // 播放显示动画 playAnim.Play(false); }
static public int Play(IntPtr l) { try { int argc = LuaDLL.lua_gettop(l); if (argc == 2) { UIPlayAnimation self = (UIPlayAnimation)checkSelf(l); System.Boolean a1; checkType(l, 2, out a1); self.Play(a1); pushValue(l, true); return(1); } else if (argc == 3) { UIPlayAnimation self = (UIPlayAnimation)checkSelf(l); System.Boolean a1; checkType(l, 2, out a1); System.Boolean a2; checkType(l, 3, out a2); self.Play(a1, a2); pushValue(l, true); return(1); } pushValue(l, false); LuaDLL.lua_pushstring(l, "No matched override function to call"); return(2); } catch (Exception e) { return(error(l, e)); } }
IEnumerator CloseMoveUpAni() { //等待隐藏小动画完成 yield return(new WaitForSeconds(0.5f)); if (myTransform.localScale.x <= 0.625f && myTransform.localScale.x >= 0.375f) { UIPlayAnimation pa = AdapterHost.GetComponent <UIPlayAnimation>(); pa.clipName = "ChapterItemInitMoveDown0"; pa.playDirection = AnimationOrTween.Direction.Reverse; pa.Play(true, false); } else if (myTransform.localScale.x <= 0.875f && myTransform.localScale.x >= 0.625f) { UIPlayAnimation pa = AdapterHost.GetComponent <UIPlayAnimation>(); pa.clipName = "ChapterItemInitMoveDown0"; pa.playDirection = AnimationOrTween.Direction.Reverse; pa.Play(true, false); } else if (myTransform.localScale.x <= 1.125f && myTransform.localScale.x >= 0.875f) { UIPlayAnimation pa = AdapterHost.GetComponent <UIPlayAnimation>(); pa.clipName = "ChapterItemInitMoveDown0"; pa.playDirection = AnimationOrTween.Direction.Reverse; pa.Play(true, false); } yield return(null); }
IEnumerator MoveDownAni() { if (myTransform.localScale.x < 0.625f && myTransform.localScale.x > 0.375f) { UIPlayAnimation pa = AdapterHost.GetComponent <UIPlayAnimation>(); pa.clipName = "ChapterItemMoveDown"; pa.playDirection = AnimationOrTween.Direction.Forward; pa.Play(true, false); } else if (myTransform.localScale.x < 0.875f && myTransform.localScale.x > 0.625f) { //yield return new WaitForSeconds(0.2f); UIPlayAnimation pa = AdapterHost.GetComponent <UIPlayAnimation>(); pa.clipName = "ChapterItemMoveDown"; pa.playDirection = AnimationOrTween.Direction.Forward; pa.Play(true, false); } else if (myTransform.localScale.x < 1.125f && myTransform.localScale.x > 0.875f) { yield return(new WaitForSeconds(0.3f)); UIPlayAnimation pa = AdapterHost.GetComponent <UIPlayAnimation>(); pa.clipName = "ChapterItemExpand"; pa.playDirection = AnimationOrTween.Direction.Forward; pa.Play(true, false); } yield return(null); }
private void PlayAnimation(string strAni) { // 播放进入动画 aniPlayer.clipName = strAni; aniPlayer.resetOnPlay = true; aniPlayer.Play(true, false); }
private void Awake() { uian = GetComponent <UIPlayAnimation>(); uian.PlayForward(); uian.Play(false); uian.animator.speed = 0; }
IEnumerator coroutineClickOther(UIPlayAnimation go) { yield return(new WaitForSeconds(0.5F)); go.Play(true); StartCoroutine(coroutineCloseBonusMenuAnim()); }
private void HideAllJuanzhou() { if (NGUITools.GetActive(juanzhou)) { UIPlayAnimation pa = AdapterHost.GetComponent <UIPlayAnimation>(); pa.clipName = string.Format("ChapterItemOnCenterAni{0}Exit", _resourceChapterId); pa.playDirection = AnimationOrTween.Direction.Forward; pa.Play(true, false); if (_isShowScrollEx) { scrollExComp.PlayExitAnim(); } } }
public void OnMoveToCenter() { if (isCenter) { return; } //Debuger.LogWarning (string.Format("OnMoveToCenter{0}", chapterID)); isCenter = true; HideAllJuanzhou(); KHAudioManager.PlaySound(9906); sndIns = KHAudioManager.PlaySound(40000 + _resourceChapterId); NGUITools.SetActive(juanzhou, true); UIPlayAnimation pa = AdapterHost.GetComponent <UIPlayAnimation>(); pa.clipName = string.Format("ChapterItemOnCenterAni{0}Enter", _resourceChapterId); pa.playDirection = AnimationOrTween.Direction.Forward; pa.Play(true, false); DuplicateModel model = KHPluginManager.Instance.GetPluginByName(DuplicatePlugin.pluginName).Model as DuplicateModel; model.CurChapterID = _chapterID; if (ExpandPackManager.isValid(1, _resourceChapterId)) { NGUITools.SetActive(goNeedDownload, false); } else { NGUITools.SetActive(goNeedDownload, true); if (ExpandPackManager.isNeedUpdate(1, _resourceChapterId)) { lblNeedDonwload.text = "需更新扩展包"; } else { lblNeedDonwload.text = "需下载扩展包"; } } if (_isShowScrollEx) { scrollExComp.PlayEnterAnim(); } }
IEnumerator InitMoveDownAni() { if (myTransform.localScale.x < 0.625f /* && myTransform.localScale.x > 0.375f*/) { yield return(new WaitForSeconds(0.4f)); UIPlayAnimation pa = AdapterHost.GetComponent <UIPlayAnimation>(); pa.clipName = "ChapterItemInitMoveDown0"; pa.playDirection = AnimationOrTween.Direction.Forward; pa.Play(true, false); KHUIManager.Instance.SendMessage(UIDef.LEVEL_SELECT_CHAPTER, "SetIsAni", false); } else if (myTransform.localScale.x < 0.875f && myTransform.localScale.x > 0.625f) { yield return(new WaitForSeconds(0.2f)); UIPlayAnimation pa = AdapterHost.GetComponent <UIPlayAnimation>(); pa.clipName = "ChapterItemInitMoveDown0"; pa.playDirection = AnimationOrTween.Direction.Forward; pa.Play(true, false); //yield return new WaitForSeconds(0.6f); KHUIManager.Instance.SendMessage(UIDef.LEVEL_SELECT_CHAPTER, "SetIsAni", false); } else if (myTransform.localScale.x < 1.125f && myTransform.localScale.x > 0.875f) { UIPlayAnimation pa = AdapterHost.GetComponent <UIPlayAnimation>(); pa.clipName = "ChapterItemInitMoveDown0"; pa.playDirection = AnimationOrTween.Direction.Forward; pa.Play(true, false); } else { UIPlayAnimation pa = AdapterHost.GetComponent <UIPlayAnimation>(); pa.clipName = "ChapterItemInitMoveDown0"; pa.playDirection = AnimationOrTween.Direction.Forward; pa.Play(true, false); } yield return(null); wgtAnimate.alpha = 1f; }
public static int Play(IntPtr l) { int result; try { int num = LuaDLL.pua_gettop(l); if (num == 2) { UIPlayAnimation uIPlayAnimation = (UIPlayAnimation)LuaObject.checkSelf(l); bool forward; LuaObject.checkType(l, 2, out forward); uIPlayAnimation.Play(forward); LuaObject.pushValue(l, true); result = 1; } else if (num == 3) { UIPlayAnimation uIPlayAnimation2 = (UIPlayAnimation)LuaObject.checkSelf(l); bool forward2; LuaObject.checkType(l, 2, out forward2); bool onlyIfDifferent; LuaObject.checkType(l, 3, out onlyIfDifferent); uIPlayAnimation2.Play(forward2, onlyIfDifferent); LuaObject.pushValue(l, true); result = 1; } else { LuaObject.pushValue(l, false); LuaDLL.pua_pushstring(l, "No matched override function to call"); result = 2; } } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
void OnPaComplete() { //uiAA.enabled = false; //uiPlayAni.enabled = false; if (uiPlayAni.clipName.Contains("ChapterItemOnCenterAni")) { if (uiPlayAni.playDirection == AnimationOrTween.Direction.Forward) { if (uiPlayAni.clipName.EndsWith("Exit")) { if (NGUITools.GetActive(juanzhou)) { uiAA.enabled = false; NGUITools.SetActive(juanzhou, false); } KHUIManager.Instance.Dispatcher.dispatchEvent(_exitAnimComplete); } else if (uiPlayAni.clipName.EndsWith("Enter")) { if (uiPlayAni.clipName.EndsWith(string.Format("ChapterItemOnCenterAni{0}Enter", _resourceChapterId))) { uiPlayAni.clipName = string.Format("ChapterItemOnCenterAni{0}Recycle", _resourceChapterId); uiPlayAni.playDirection = AnimationOrTween.Direction.Forward; uiPlayAni.Play(true, false); } } } } else if (uiPlayAni.clipName.Contains("ChapterItemInitMoveDown0")) { uiAA.enabled = false; } else if (uiPlayAni.clipName.Contains("ChapterItemExpand")) { KHPluginManager.Instance.GetPluginByName(LevelSelectPlugin.pluginName).HideView(UIDef.LEVEL_SELECT_CHAPTER); } }
/// <summary> /// 播放动画 /// </summary> private void PlayAnimation(string strAni, float speed = 1.0f) { aniPlayer.clipName = strAni; aniPlayer.resetOnPlay = true; aniPlayer.Play(true, false); }