private void PlayAnim(PlayableDirector director, Action onComplete = null) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) m_isAnimating = true; this.get_gameObject().SetActive(true); if (m_animCoroutine != null) { this.StopCoroutine(m_animCoroutine); } if (m_playingDirector != null) { PlayableGraph playableGraph = m_playingDirector.get_playableGraph(); if (playableGraph.IsValid()) { playableGraph = m_playingDirector.get_playableGraph(); if (!playableGraph.IsDone()) { m_playingDirector.Stop(); } } } m_playingDirector = director; director.set_time(0.0); director.Play(); m_animCoroutine = this.StartCoroutine(AnimCoroutine(director, onComplete)); }
private IEnumerator PlayDirectorCoroutine(PlayableDirector director, Action completeCallback = null) { if (null == director) { yield break; } m_currentPlayingDirector = director; director.set_time(0.0); director.Play(); PlayableGraph playableGraph = director.get_playableGraph(); while (playableGraph.IsValid() && !playableGraph.IsDone()) { yield return(null); if (null == director) { yield break; } playableGraph = director.get_playableGraph(); } completeCallback?.Invoke(); m_playCoroutine = null; m_currentPlayingDirector = null; }
public static IEnumerator PlayDirector(PlayableDirector director) { director.set_time(0.0); director.Play(); while (true) { PlayableGraph playableGraph = director.get_playableGraph(); if (playableGraph.IsValid()) { playableGraph = director.get_playableGraph(); if (!playableGraph.IsDone()) { yield return(null); continue; } break; } break; } }
protected IEnumerator PlayAnimation(TimelineAsset animation) { PlayableDirector director = m_animationDirector.GetDirector(); director.Play(animation); PlayableGraph graph = director.get_playableGraph(); while (graph.IsValid() && !graph.IsDone()) { yield return(null); } }
public IEnumerator PlayEnterAnim() { m_allowInteraction = false; m_playableDirector.Play(); PlayableGraph graph = m_playableDirector.get_playableGraph(); while (graph.IsValid() && !graph.IsDone()) { yield return(null); } m_allowInteraction = true; }
public static bool HasReachedEndOfAnimation(this PlayableDirector director) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) PlayableGraph playableGraph = director.get_playableGraph(); if (playableGraph.IsValid()) { return(playableGraph.IsDone()); } return(true); }
private IEnumerator AnimCoroutine(PlayableDirector director, Action onComplete = null) { PlayableGraph graph = director.get_playableGraph(); while (graph.IsValid() && !graph.IsDone()) { yield return(null); } this.get_gameObject().SetActive(false); m_isAnimating = false; onComplete?.Invoke(); m_animCoroutine = null; }
public override IEnumerator DestroyWhenFinished(Component instance) { PlayableDirector playableDirector = instance; PlayableGraph playableGraph; do { yield return(null); if (null == playableDirector) { yield break; } playableGraph = playableDirector.get_playableGraph(); }while (playableGraph.IsValid() && !playableGraph.IsDone()); FightObjectFactory.DestroyTimelineAssetEffectInstance(playableDirector, clearFightContext: false); }