Guest User

Untitled

a guest
Jul 19th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. using UnityEngine;
  2.  
  3. public class InstanceTest : MonoBehaviour {
  4. public int cnt; public bool startTest1 = false; public bool startTest2 = false;
  5.  
  6. void Update()
  7. {
  8. if (startTest1)
  9. Test1(cnt);
  10. if (startTest2)
  11. Test2(cnt);
  12. }
  13. void Test1(int cnt)
  14. {
  15. float a;
  16. for (int i = 0; i < cnt; i++)
  17. a = 1f + 1f;
  18. }
  19. static void Test2(int cnt)
  20. {
  21. float a;
  22. for (int i = 0; i < cnt; i++)
  23. a = 1f + 1f;
  24. }
  25. }
Add Comment
Please, Sign In to add comment