Guest User

Untitled

a guest
Oct 30th, 2017
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.77 KB | None | 0 0
  1. void Start()
  2. {
  3.     StartCoroutine(Material_On);
  4. }
  5.  
  6. IEnumerator Material_On()
  7.         {
  8.             while(true){
  9.  
  10.                 while(!_enabled || !flagEnabled){
  11.                     yield return null;
  12.                 }
  13.                    
  14.                 StopAllCoroutines();
  15.                 yield return StartCoroutine(GetColorCurrent());
  16.                 yield return StartCoroutine(GetEmissionCurrent());
  17.                 StartCoroutine(ColorActivated());
  18.                 StartCoroutine(EmissionActivated());
  19.                    
  20.                 flagDisabled = true;    //y esto?
  21.                 flagEnabled = false;    
  22.                 //creo que pasa el cuadro, aunque "yieldiés" un int, bool, o lo que sea
  23.                 //distinto a las clases que yield reconoce
  24.        
  25.                 yield return null;  //yield de while (true)
  26.             }
  27.  
  28.             yield return null;  //Ojo no se si este va
  29.         }
  30.    }
Advertisement
Add Comment
Please, Sign In to add comment