/************************************************************************ * Coroutine Declaration * ************************************************************************/ protected override IEnumerator CoroutineStart() { if (this._tween != null) { this._tween.Stop(); this._tween = null; } RectTransform transButton = this.button.transform as RectTransform; transButton.anchoredPosition3D = this._positionButton; transButton.sizeDelta = this._sizeButton; RectTransform transDropdown = this.dropdown.transform as RectTransform; transDropdown.offsetMin = this._offsetMinDropdown; transDropdown.offsetMax = this._offsetMaxDropdown; yield return(new WaitForSeconds(0.5f)); TweenUIData data = this.uiContainer.Data; XHash hashButton = XHash.New.AddLeft(400f).AddY(-250f).AddRight(1680f).AddHeight(400f); XHash hashDropdown = XHash.New.AddLeft(2000f).AddRight(300f).AddTop(250f).AddBottom(790f); this._tween = XTween.ParallelTweens ( false, XTween.To(this.button, hashButton, data.time, data.Easing), XTween.To(this.dropdown, hashDropdown, data.time, data.Easing) ); this._tween.Play(); }
/************************************************************************ * Private Method Declaration * ************************************************************************/ /************************************************************************ * Protected Method Declaration * ************************************************************************/ /************************************************************************ * Public Method Declaration * ************************************************************************/ public override void UIChangeHandler() { TweenUIData data = this.uiContainer.Data; string easing = data.easingType.ToString() + ".ease" + data.inOutType.ToString(); string input; if (this.uiContainer.is3D) { input = "<color=#43C9B0>XHash</color> hash = XHash.New\n" + "\t\t<color=#DCDC9D>.AddX(</color><color=#A7CE89>200f</color><color=#DCDC9D>).AddY(</color><color=#A7CE89>50f</color><color=#DCDC9D>).AddZ(</color><color=#A7CE89>-1000f</color><color=#DCDC9D>)\n" + "\t\t.AddScaleX(</color><color=#A7CE89>400f</color><color=#DCDC9D>).AddScaleY(</color><color=#A7CE89>400f</color><color=#DCDC9D>).AddScaleZ(</color><color=#A7CE89>400f</color><color=#DCDC9D>)\n" + "\t\t.AddRotationY(</color><color=#A7CE89>-110f</color><color=#DCDC9D>)</color>;\n" + "XTween<color=#DCDC9D>.To(</color>target3D, hash, <color=#A7CE89>" + data.time + "f,</color> " + easing + "<color=#DCDC9D>).Play()</color>;"; } else { input = "<color=#43C9B0>XHash</color> hash = XHash.New\n" + "\t\t<color=#DCDC9D>.AddX(</color><color=#A7CE89>800f</color><color=#DCDC9D>).AddY(</color><color=#A7CE89>300f</color><color=#DCDC9D>)\n" + "\t\t.AddScaleX(</color><color=#A7CE89>400f</color><color=#DCDC9D>).AddScaleY(</color><color=#A7CE89>400f</color><color=#DCDC9D>)\n" + "\t\t.AddRotationZ(</color><color=#A7CE89>330f</color><color=#DCDC9D>)</color>;\n" + "XTween<color=#DCDC9D>.To(</color>target2D, hash, <color=#A7CE89>" + data.time + "f,</color> " + easing + "<color=#DCDC9D>).Play()</color>;"; } this.textCode.text = input; }
/************************************************************************ * Coroutine Declaration * ************************************************************************/ protected override IEnumerator CoroutineStart() { if (this._tween != null) { this._tween.Stop(); this._tween = null; } this.target2D.transform.localPosition = this._position2D; this.target3D.transform.localPosition = this._position3D; yield return(new WaitForSeconds(0.5f)); TweenUIData data = this.uiContainer.Data; if (this.container2D.activeSelf) { XHash hash = XHash.New.AddX(800f).AddY(300f) .AddControlPointX(-1300f, 550f).AddControlPointY(550f, -800f); this._tween = XTween.To(this.target2D, hash, data.time, data.Easing); this._tween.Play(); } else { XHash hash = XHash.New.AddX(200f).AddY(50f).AddZ(-1500f) .AddControlPointX(-1000f, 550f).AddControlPointY(550f, -300f); this._tween = XTween.To(this.target3D, hash, data.time, data.Easing); this._tween.Play(); } }
/************************************************************************ * Private Method Declaration * ************************************************************************/ /************************************************************************ * Protected Method Declaration * ************************************************************************/ /************************************************************************ * Public Method Declaration * ************************************************************************/ public override void UIChangeHandler() { RectTransform trans = this.transInputCode; TweenUIData data = this.uiContainer.Data; string easing = data.easingType.ToString() + ".ease" + data.inOutType.ToString(); string input = this.container2D.activeSelf ? "<color=#43C9B0>XObjectHash</color> hash = XObjectHash.New<color=#A7CE89>.Add(</color><color=#CE9178>\"r\"</color>,<color=#A7CE89>1f</color>,<color=#A7CE89>0.56f</color><color=#A7CE89>).Add(</color><color=#CE9178>\"g\"</color>,<color=#A7CE89>1f</color>,<color=#A7CE89>0.83f</color><color=#A7CE89>);</color>\n" + "XTween<color=#DCDC9D>.ValueTo(</color>hash, UpdateColor, <color=#A7CE89>" + data.time + "f,</color> " + easing + "<color=#DCDC9D>).Play()</color>;\n" + "\n" + "<color=#3F9CD6>void</color> <color=#A7CE89>UpdateColor(</color><color=#43C9B0>XObjectHash</color> hash<color=#A7CE89>)\n" + "{</color>\n" + "\t\t<color=#43C9B0>Color</color> color = sprite.color;\n" + "\t\tcolor.r = hash<color=#DCDC9D>.Now(</color><color=#CE9178>\"r\"</color>);\n" + "\t\tcolor.g = hash<color=#DCDC9D>.Now(</color><color=#CE9178>\"g\"</color>);\n" + "\t\tsprite.color = color;\n" + "<color=#A7CE89>}</color>" : "<color=#43C9B0>XObjectHash</color> hash = XObjectHash.New<color=#A7CE89>.Add</color>(<color=#CE9178>\"fieldOfView\"</color>, <color=#A7CE89>6f</color>);\n" + "XTween<color=#A7CE89>.ValueTo</color><<color=#43C9B0>Camera</color>>(camera3D, hash, <color=#A7CE89>" + data.time + "f,</color> " + easing + "<color=#DCDC9D>).Play()</color>;"; Vector2 size = trans.sizeDelta; size.y = this.container2D.activeSelf ? 510f : 170f; trans.sizeDelta = size; this.textCode.text = input; }
/************************************************************************ * Coroutine Declaration * ************************************************************************/ protected override IEnumerator CoroutineStart() { if (this._tween != null) { this._tween.Stop(); this._tween = null; } this.sprite.color = this._color; this.camera3D.fieldOfView = this._defaultFieldOfView; yield return(new WaitForSeconds(0.5f)); TweenUIData data = this.uiContainer.Data; if (this.container2D.activeSelf) { XObjectHash hash = XObjectHash.New.Add("r", 1f, 0.56f).Add("g", 1f, 0.83f); this._tween = XTween.To(hash, UpdateColor, data.time, data.Easing); this._tween.Play(); } else { XObjectHash hash = XObjectHash.New.Add("fieldOfView", 6f); this._tween = XTween.To <Camera>(this.camera3D, hash, data.time, data.Easing); this._tween.Play(); } }
/************************************************************************ * Coroutine Declaration * ************************************************************************/ protected override IEnumerator CoroutineStart() { if (this._tween != null) { this._tween.Stop(); this._tween = null; } this.target2D.transform.localPosition = this._position2D; this.target3D.transform.localPosition = this._position3D; yield return(new WaitForSeconds(0.5f)); TweenUIData data = this.uiContainer.Data; if (this.container2D.activeSelf) { this._tween = XTween.To(this.target2D, XHash.New.AddX(800f).AddY(300f), data.time, data.Easing); this._tween.Play(); } else { // this._tween = XTween.To(this.target3D, hash, data.time, data.Easing); // XObjectHash hash = XObjectHash.New.Add("fieldOfView", 6f); // this._tween = XTween.ValueTo<Camera>(this.camera3D,hash,data.time,data.Easing); // this._tween.OnComplete = Executor.New(() => this.StartCoroutine(this.Test())); // yield return this._tween.WaitForGotoAndPlay(0.2f); yield return(XTween.SerialTweens(false, this.target3D.To(XHash.New.Scale(300f, 100f, 400f), data.time), this.target3D.To(XHash.New.Position(200f, 50f, -1500f), data.time)).WaitForPlay()); // this.target3D.transform.DOLocalMove(new Vector3(200f,50f,-1500f), data.time).Play(); Debug.Log("Test"); } }
/************************************************************************ * Coroutine Declaration * ************************************************************************/ protected override IEnumerator CoroutineStart() { if (this._tween != null) { this._tween.Stop(); } this.target3D.transform.localPosition = this._position3D; this.target3DSecond.transform.localPosition = this._position3DSecond; yield return(new WaitForSeconds(0.5f)); TweenUIData data = this.uiContainer.Data; if (this._tween == null) { this._tween = XTween.SerialTweens ( false, target3DSecond.ToPosition3D(-940f, -160f, -500f, data.time, data.Easing), target3D.ToPosition3D(200f, 70f, -1500f, data.time, data.Easing) ).SetLock().Play(); } else { this._tween.Play(0f); } }
/************************************************************************ * Private Method Declaration * ************************************************************************/ /************************************************************************ * Protected Method Declaration * ************************************************************************/ /************************************************************************ * Public Method Declaration * ************************************************************************/ public override void UIChangeHandler() { TweenUIData data = this.uiContainer.Data; string easing = data.easingType.ToString() + ".ease" + data.inOutType.ToString(); string input = this.uiContainer.is3D ? "XTween<color=#DCDC9D>.To(</color>target3D, XHash.New<color=#DCDC9D>.AddScaleX(</color><color=#A7CE89>550f</color><color=#DCDC9D>).AddSacleY(</color><color=#A7CE89>550f</color><color=#DCDC9D>).AddScaleZ(</color><color=#A7CE89>550f</color><color=#DCDC9D>), " + data.time + "f,</color> " + easing + "<color=#DCDC9D>).Play()</color>;" : "XTween<color=#DCDC9D>.To(</color>target2D, XHash.New<color=#DCDC9D>.AddScaleX(</color><color=#A7CE89>500f</color><color=#DCDC9D>).AddScaleY(</color><color=#A7CE89>500f</color><color=#DCDC9D>), " + data.time + "f,</color> " + easing + "<color=#DCDC9D>).Play()</color>;"; this.textCode.text = input; }
/************************************************************************ * Private Method Declaration * ************************************************************************/ /************************************************************************ * Protected Method Declaration * ************************************************************************/ /************************************************************************ * Public Method Declaration * ************************************************************************/ public override void UIChangeHandler() { TweenUIData data = this.uiContainer.Data; string easing = data.easingType.ToString() + ".ease" + data.inOutType.ToString(); string input = "<color=#43C9B0>XColorHash</color> hash = XColorHash.New<color=#DCDC9D>.AddRed(</color><color=#A7CE89>0.56f</color><color=#DCDC9D>).AddGreen(</color><color=#A7CE89>0.83f</color><color=#DCDC9D>).AddAlpha(</color><color=#A7CE89>1f</color><color=#DCDC9D>);</color>\n" + "XTween<color=#DCDC9D>.ColorTo(</color>sprite, hash, <color=#A7CE89>" + data.time + "f,</color> " + easing + "<color=#DCDC9D>).Play()</color>;"; this.textCode.text = input; }
/************************************************************************ * Private Method Declaration * ************************************************************************/ /************************************************************************ * Protected Method Declaration * ************************************************************************/ /************************************************************************ * Public Method Declaration * ************************************************************************/ public override void UIChangeHandler() { TweenUIData data = this.uiContainer.Data; string easing = data.easingType.ToString() + ".ease" + data.inOutType.ToString(); string input = "<color=#43C9B0>XHash</color> hashButton = XHash.New<color=#DCDC9D>.AddX(<color=#A7CE89>400f</color>).AddY(<color=#A7CE89>-250f</color>).AddWidth(<color=#A7CE89>800f</color>).AddHeight(<color=#A7CE89>400f</color>);</color>\n" + "XTween<color=#DCDC9D>.To(</color>button, hashButton, <color=#DCDC9D>" + data.time + "f,</color> " + easing + "<color=#DCDC9D>).Play();</color>\n" + "<color=#43C9B0>XHash</color> hashDropdown = XHash<color=#DCDC9D>.New.AddLeft(<color=#A7CE89>2000f</color>).AddRight(<color=#A7CE89>300f</color>).AddTop(<color=#A7CE89>250f</color>).AddBottom(<color=#A7CE89>790f</color>);</color>\n" + "XTween<color=#DCDC9D>.To(</color>dropdown, hashDropdown, <color=#A7CE89>" + data.time + "f,</color> " + easing + "<color=#DCDC9D>).Play();</color>"; this.textCode.text = input; }
/************************************************************************ * Coroutine Declaration * ************************************************************************/ protected override IEnumerator CoroutineStart() { WaitForSeconds wait = new WaitForSeconds(0.1f); if (this._tween != null) { // this._tween.Stop(); // this._tween = null; } if (this.target3D != null) { this.target2D.transform.localPosition = this._position2D; // this.target3D.transform.localPosition = this._position3D; } yield return(new WaitForSeconds(0.5f)); TweenUIData data = this.uiContainer.Data; if (this.container2D.activeSelf) { this._tween = XTween.To(this.target2D, XHash.New.AddX(800f).AddY(300f), data.time, data.Easing); this._tween.Play(); } else { IEasing ease = Ease.ElasticOut; yield return(wait); if (this._tween == null) { this._tween = target3D.ToPosition3D(200, 50, -1500, 3f).SetLock().SetReverse().SetRepeat(2).SetScale(2f).SetDelay(0.5f, 1f); this._tween.AddOnStop(() => Debug.Log("Stop")); this.isPlay = true; yield return(this._tween.WaitForPlay()); } else { if (isPlay) { isPlay = false; this._tween.Stop(); } else { isPlay = true; yield return(this._tween.WaitForPlay()); } } this.StartXTween(this.target3D); } }
/************************************************************************ * Private Method Declaration * ************************************************************************/ /************************************************************************ * Protected Method Declaration * ************************************************************************/ /************************************************************************ * Public Method Declaration * ************************************************************************/ public override void UIChangeHandler() { TweenUIData data = this.uiContainer.Data; string easing = data.easingType.ToString() + ".ease" + data.inOutType.ToString(); string input = "XTween.SerialTweens\n" + "(\n" + "\t\t<color=#3F9CD6>false</color>,\n" + "\t\tXTween<color=#DCDC9D>.To(</color>target3DSecond, XHash.New<color=#DCDC9D>.AddX(</color><color=#A7CE89>-940f</color><color=#DCDC9D>).AddY(</color><color=#A7CE89>-160f</color><color=#DCDC9D>).AddZ(</color><color=#A7CE89>-500f</color><color=#DCDC9D>)</color>, <color=#A7CE89>" + data.time + "f,</color> " + easing + "<color=#DCDC9D>)</color>,\n" + "\t\tXTween<color=#DCDC9D>.To(</color>target3D, XHash.New<color=#DCDC9D>.AddX(</color><color=#A7CE89>200f</color><color=#DCDC9D>).AddY(</color><color=#A7CE89>70f</color><color=#DCDC9D>).AddZ(</color><color=#A7CE89>-1500f</color><color=#DCDC9D>)</color>, <color=#A7CE89>" + data.time + "f,</color> " + easing + "<color=#DCDC9D>)</color>\n" + ")<color=#DCDC9D>.Play()</color>;"; this.textCode.text = input; }
/************************************************************************ * Private Method Declaration * ************************************************************************/ /************************************************************************ * Protected Method Declaration * ************************************************************************/ /************************************************************************ * Public Method Declaration * ************************************************************************/ public override void UIChangeHandler() { TweenUIData data = this.uiContainer.Data; string easing = data.easingType.ToString() + ".ease" + data.inOutType.ToString(); string input = "<color=#43C9B0>IAni</color> tween = XTween<color=#DCDC9D>.To(</color>target2D, XHash.New<color=#DCDC9D>.AddX(</color><color=#A7CE89>800f</color><color=#DCDC9D>).AddY(</color><color=#A7CE89>300f</color><color=#DCDC9D>), " + data.time + "f,</color> " + easing + "<color=#DCDC9D>)</color>;\n" + "tween.onComplete = Executor<<color=#3F9CD6>string</color>><color=#DCDC9D>.New(</color>TweenComplete, <color=#CE9178>\"Tween Complete!\"</color>);\n" + "tween<color=#DCDC9D>.onPlay();</color>\n" + "\n" + "<color=#3F9CD6>void</color> <color=#DCDC9D>TweenComplete(</color><color=#3F9CD6>string</color> message)\n" + "{\n" + "\t\ttextLog.text = message;\n" + "}"; this.textCode.text = input; }
/************************************************************************ * Coroutine Declaration * ************************************************************************/ protected override IEnumerator CoroutineStart() { if (this._tween != null) { this._tween.Stop(); this._tween = null; } this.sprite.color = this._color; yield return(new WaitForSeconds(0.5f)); TweenUIData data = this.uiContainer.Data; XColorHash hash = XColorHash.New.AddRed(0.56f).AddGreen(0.83f).AddAlpha(1f); this._tween = XTween.To(sprite, hash, data.time, data.Easing); this._tween.Play(); }
/************************************************************************ * Coroutine Declaration * ************************************************************************/ protected override IEnumerator CoroutineStart() { if (this._tween != null) { this._tween.Stop(); this._tween = null; } this.target3D.transform.localPosition = this._position3D; this.textLog.text = "Tween Ready"; yield return(new WaitForSeconds(0.5f)); TweenUIData data = this.uiContainer.Data; this.textLog.text = "Tweening..."; this._tween = XTween.To(this.target3D, XHash.New.AddX(200f).AddY(50f).AddZ(-1500f), data.time, data.Easing); this._tween.AddOnComplete(Executor <string> .New(TweenComplete, "Tween Complete!")); this._tween.Play(); }
/************************************************************************ * Coroutine Declaration * ************************************************************************/ protected override IEnumerator CoroutineStart() { if (this._tween != null) { this._tween.Stop(); this._tween = null; } this.target2D.transform.localPosition = this._position2D; this.target3D.transform.localPosition = this._position3D; List <GameObject> targetList = new List <GameObject>(); const int COUNT = 100; for (int i = 0; i < COUNT; ++i) { GameObject target = GameObject.Instantiate(this.target3D); Transform trans = target.transform; trans.SetParent(this.target3D.transform.parent); trans.localPosition = new Vector3(UnityEngine.Random.Range(-1200f, 1200f), UnityEngine.Random.Range(-500f, 500f), -100f); trans.localScale = Vector3.one * 100f; targetList.Add(target); } GC.Collect(); yield return(new WaitForSeconds(0.5f)); TweenUIData data = this.uiContainer.Data; for (int i = 0; i < COUNT; ++i) { this.StartXTween(targetList[i]); // this.StartiTween(targetList[i]); } while (true) { if (_isBreak) { GC.Collect(); yield return(new WaitForSeconds(0.1f)); Debug.Break(); } yield return(null); } }
/************************************************************************ * Coroutine Declaration * ************************************************************************/ protected override IEnumerator CoroutineStart() { if (this._tween != null) { this._tween.Stop(); this._tween = null; } this.target3D.transform.localPosition = this._position3D; this.target3DSecond.transform.localPosition = this._position3DSecond; yield return(new WaitForSeconds(0.5f)); TweenUIData data = this.uiContainer.Data; this._tween = XTween.ParallelTweens ( false, XTween.To(this.target3DSecond, XHash.New.AddX(-940f).AddY(-160f).AddZ(-500f), data.time, data.Easing), XTween.To(this.target3D, XHash.New.AddX(200f).AddY(70f).AddZ(-1500f), data.time, data.Easing) ); this._tween.Play(); }
/************************************************************************ * Coroutine Declaration * ************************************************************************/ protected override IEnumerator CoroutineStart() { if (this._tween != null) { this._tween.Stop(); this._tween = null; } this.target2D.transform.localPosition = this._position2D; this.target3D.transform.localPosition = this._position3D; yield return(new WaitForSeconds(0.2f)); TweenUIData data = this.uiContainer.Data; if (this.container2D.activeSelf) { this._tween = this.target2D.ToPosition2D(800f, 300f, data.time, data.Easing).Play(); } else { this._tween = this.target3D.ToPosition3D(200f, 50f, -1500, data.time, data.Easing).Play(); } }
/************************************************************************ * Coroutine Declaration * ************************************************************************/ protected override IEnumerator CoroutineStart() { if (this._tween != null) { this._tween.Stop(); this._tween = null; } this.target2D.transform.localScale = this._scale2D; this.target3D.transform.localScale = this._scale3D; yield return(new WaitForSeconds(0.5f)); TweenUIData data = this.uiContainer.Data; if (this.container2D.activeSelf) { this._tween = target2D.ToScale2D(400f, 400f, data.time, data.Easing); this._tween.Play(); } else { this._tween = target3D.ToScale3D(550f, 550f, 550f, data.time, data.Easing); this._tween.Play(); } }
/************************************************************************ * Coroutine Declaration * ************************************************************************/ protected override IEnumerator CoroutineStart() { if (this._tween != null) { this._tween.Stop(); this._tween = null; } this.target2D.transform.localEulerAngles = this._angle2D; this.target3D.transform.localEulerAngles = this._angle3D; yield return(new WaitForSeconds(0.5f)); TweenUIData data = this.uiContainer.Data; if (this.container2D.activeSelf) { this._tween = XTween.To(this.target2D, XHash.New.AddRotationZ(400f), data.time, data.Easing); this._tween.Play(); } else { this._tween = XTween.To(this.target3D, XHash.New.AddRotationY(-70f), data.time, data.Easing); this._tween.Play(); } }
/************************************************************************ * Coroutine Declaration * ************************************************************************/ protected override IEnumerator CoroutineStart() { if (this._tween != null) { this._tween.Stop(); this._tween = null; } this.target2D.transform.localPosition = this._position2D; this.target2D.transform.localScale = this._scale2D; this.target2D.transform.localEulerAngles = this._angle2D; this.target3D.transform.localPosition = this._position3D; this.target3D.transform.localScale = this._scale3D; this.target3D.transform.localEulerAngles = this._angle3D; yield return(new WaitForSeconds(0.5f)); TweenUIData data = this.uiContainer.Data; if (this.container2D.activeSelf) { XHash hash = XHash.New .AddX(800f).AddY(300f) .AddScaleX(400f).AddScaleY(400f) .AddRotationZ(330f); this._tween = XTween.To(this.target2D, hash, data.time, data.Easing); this._tween.Play(); } else { XHash hash = XHash.New .AddX(200f).AddY(50f).AddZ(-1000f) .AddScaleX(400f).AddScaleY(400f).AddScaleZ(400f) .AddRotationY(-110f); this._tween = XTween.To(this.target3D, hash, data.time, data.Easing); this._tween.Play(); } }
/************************************************************************ * Coroutine Declaration * ************************************************************************/ //XTween 1000 - x,y,z - Start: 122B|2.7ms, End: 0B|1ms, Update: 0.8ms //DTween 1000 - x,y,z - Start: 0.6MB|1.8ms, End: 0B|1ms, Update: 0.8ms //iTween 1000 - x,y,z - Start: 4.7MB|158ms, End: 169.9KB|80ms, Update: 1.7ms protected override IEnumerator CoroutineStart() { if (this._tween != null) { this._tween.Stop(); this._tween = null; } this.target2D.transform.localPosition = this._position2D; this.target3D.transform.localPosition = this._position3D; int length = 1000; if (this._objList == null) { this._objList = new List <ObjectSet>(); for (int i = 0; i < length; ++i) { GameObject target = GameObject.Instantiate(this.target3D); Transform trans = target.transform; trans.SetParent(this.target3D.transform.parent); Vector3 pos = new Vector3(UnityEngine.Random.Range(-1200f, 1200f), UnityEngine.Random.Range(-500f, 500f), -100f); trans.localPosition = pos; trans.localScale = Vector3.one * 100f; ObjectSet set = new ObjectSet(); set.obj = target; set.pos = pos; this._objList.Add(set); } } else { for (int i = 0; i < length; ++i) { this._objList[i].SetDefault(); } } WaitForSeconds wait = new WaitForSeconds(0.1f); GC.Collect(); yield return(new WaitForSeconds(0.5f)); TweenUIData data = this.uiContainer.Data; for (int i = 0; i < length; ++i) { // this.StartXTween(this._objList[i].obj); // this.StartiTween(this._objList[i].obj); // this.StartDOTween(this._objList[i].obj); this.StartLeanTween(this._objList[i].obj); } while (true) { if (_isBreak) { yield return(wait); GC.Collect(); yield return(wait); Debug.Break(); _isBreak = false; yield break; } yield return(null); } }