void Start() { animator = GameObject.Find("Camera").GetComponent <MenuAnimator> (); itemController = GameObject.Find("Canvas").GetComponent <ItemController>(); pathFollow = GameObject.Find("Camera").GetComponent <PathFollow> (); prepareObject = GameObject.Find("GameController").GetComponent <Preparation> (); especObject = GameObject.Find("espectrofotometro").GetComponent <Espectrofotometro> (); currentState = GameState.none; }
} //Aciona o menu somente quando a câmera chegar no seu devido lugar void Start() { //chamadas iniciais scripts itemController = GameObject.Find("Canvas").GetComponent <ItemController>(); animStart = GameObject.Find("Iniciar").GetComponent <Animator>(); pathFollow = GetComponent <PathFollow> (); initialFollow = GetComponent <LabInitialFollow> (); espec = GameObject.Find("espectrofotometro").GetComponent <Espectrofotometro> (); cubetaPath = GameObject.Find("Cubeta").GetComponent <CubetaMove> (); }
IEnumerator waitReset(Espectrofotometro espec) { yield return(new WaitForSeconds(2)); redLight.SetActive(true); yield return(new WaitForSeconds(1.1f)); redLight.SetActive(false); yield return(new WaitForSeconds(1.1f)); redLight.SetActive(true); yield return(new WaitForSeconds(1.1f)); redLight.SetActive(false); espec.resetEspec(); espec.setState(3); GameObject.Find("GameController").GetComponent <GameController> ().nextState(); yield break; }
IEnumerator wait(Espectrofotometro espec) { yield return(new WaitForSeconds(2)); redLight.SetActive(true); yield return(new WaitForSeconds(1.1f)); redLight.SetActive(false); yield return(new WaitForSeconds(1.1f)); redLight.SetActive(true); yield return(new WaitForSeconds(1.1f)); redLight.SetActive(false); espec.calcAbs(); yield return(new WaitForSeconds(10)); espec.setImageDialog(9); espec.bt_restart.SetActive(true); yield break; }
public bool waitASecond(Espectrofotometro espec) { StartCoroutine(wait(espec)); return(true); }
public bool waitToReset(Espectrofotometro espec) { StartCoroutine(waitReset(espec)); return(true); }