Advertisement
Guest User

Untitled

a guest
Jan 21st, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. void OnCollisionEnter2D(Collision2D other)
  2. {
  3. if (other.gameObject.tag == "Platform")
  4. {
  5. coinlights ();
  6. }
  7.  
  8. }
  9.  
  10. void coinlights()
  11. {
  12. lightnum++;
  13. for (int i = 0; i < 5; i++) {
  14. Debug.Log ("test");
  15.  
  16. if (counter >= 0.3f)
  17. {
  18. Debug.Log("first 4");
  19. lights [i].SetActive (true);
  20. counter = 0;
  21. coinlights ();
  22. }
  23.  
  24. }
  25. if (lightnum == 4)
  26. {
  27.  
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement