Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.63 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4.  
  5. public class Accuracy : MonoBehaviour
  6. {
  7.     float lastTime = 0f;
  8.  
  9.     void Awake()
  10.     {
  11.         lastTime = Time.realtimeSinceStartup;
  12.         Debug.Log(Time.realtimeSinceStartup - lastTime);
  13.  
  14.         //StartCoroutine(MethodA());
  15.     }
  16.  
  17.     IEnumerator MethodA()
  18.     {
  19.         yield return new WaitForSeconds(3.0f);
  20.         lastTime = Time.realtimeSinceStartup;
  21.         Debug.Log(Time.realtimeSinceStartup - lastTime);
  22.         StartCoroutine(MethodA());
  23.     }
  24.  
  25.     void OnApplicationQuit()
  26.     {
  27.         StopAllCoroutines();
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement