Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Start()
- {
- StartCoroutine(Material_On);
- }
- IEnumerator Material_On()
- {
- while(true){
- while(!_enabled || !flagEnabled){
- yield return null;
- }
- StopAllCoroutines();
- yield return StartCoroutine(GetColorCurrent());
- yield return StartCoroutine(GetEmissionCurrent());
- StartCoroutine(ColorActivated());
- StartCoroutine(EmissionActivated());
- flagDisabled = true; //y esto?
- flagEnabled = false;
- //creo que pasa el cuadro, aunque "yieldiés" un int, bool, o lo que sea
- //distinto a las clases que yield reconoce
- yield return null; //yield de while (true)
- }
- yield return null; //Ojo no se si este va
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment