Advertisement
snake5

SGScript blinking light

Oct 4th, 2016
460
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. function _BlinkLight( light )
  2. {
  3.     if( !light )
  4.         return;
  5.     function light_proc( light )
  6.     {
  7.         for( i = 0; i < 3; ++i )
  8.         {
  9.             light.enabled = true;
  10.             yield 0.25;
  11.             light.enabled = false;
  12.             yield 0.25;
  13.         }
  14.     }
  15.     thread light_proc( light );
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement