Advertisement
Guest User

Untitled

a guest
Oct 5th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.36 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class CoroutineSlow: MonoBehaviour {
  6.  
  7.     void Start() {
  8.         StartCoroutine(Slow());
  9.     }
  10.  
  11.     IEnumerator Slow() {
  12.  
  13.         var x = float.MaxValue;
  14.  
  15.         while (true) {
  16.  
  17.             for (var i = 0; i < 10000000; i++) {
  18.                 x = Mathf.Sqrt(x);
  19.             }
  20.  
  21.             yield return 0;
  22.         }
  23.  
  24.     }
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement