コード例 #1
0
ファイル: AnimPlayer.cs プロジェクト: jozhlh/Jamchester17
    public void Stop()
    {
        if (Application.isEditor && !Application.isPlaying)
        {
            EditorCoroutine.StopAllCoroutines(this);
        }
        else
        {
            StopAllCoroutines();
        }

        isPlaying = false;
        UpdateView();
    }
コード例 #2
0
 public void DoSomething(bool start, bool stop, bool stopAll)
 {
     if (start)
     {
         EditorCoroutine.StartCoroutine(Example(), this);
     }
     if (stop)
     {
         EditorCoroutine.StopCoroutine("Example", this);
     }
     if (stopAll)
     {
         EditorCoroutine.StopAllCoroutines(this);
     }
 }
コード例 #3
0
ファイル: AnimPlayer.cs プロジェクト: jozhlh/Jamchester17
    IEnumerator FpsStepper()
    {
        while (true)
        {
            if (wrapMode == WrapMode.Oneshot && frameIndex == frames.Count - 1)
            {
                if (Application.isEditor && !Application.isPlaying)
                {
                    EditorCoroutine.StopAllCoroutines(this);
                }
                else
                {
                    StopAllCoroutines();
                }
            }
            Next();



            yield return(new WaitForSeconds(1 / fps));
        }
    }
コード例 #4
0
 public static void StopAllCoroutines(this EditorWindow thisRef)
 {
     EditorCoroutine.StopAllCoroutines(thisRef);
 }