Advertisement
kasru

Flickering Light

Jan 13th, 2013
3,699
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //****** Donations are greatly appreciated.  ******
  2. //****** You can donate directly to Jesse through paypal at  https://www.paypal.me/JEtzler   ******
  3.  
  4. var flickering : boolean = true;
  5.  
  6. function Start() {
  7.     flickerLight();
  8. }
  9.  
  10. function Update () {
  11.  
  12. }
  13.  
  14. function flickerLight() {
  15.  
  16.     while(flickering) {
  17.         yield WaitForSeconds(1);
  18.         gameObject.light.intensity += 1;
  19.         yield WaitForSeconds(1);
  20.         gameObject.light.intensity = 0;
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement