Пример #1
0
 IEnumerator Spin(Class.Tuple <bool> stop)
 {
     while (!stop.data0)
     {
         transform.Rotate(Vector3.up * 200.0f * Time.deltaTime);
         yield return(null);
     }
 }
Пример #2
0
 UnityAction PlaySpin()
 {
     Class.Tuple <bool> stop = new Class.Tuple <bool>(false);
     StartCoroutine(Spin(stop));
     return(() =>
     {
         stop.data0 = true;
     });
 }