// Update is called once per frame void OnTriggerStay(Collider col) { if (col.tag == "Player" && GlobalFuncVari.getTutorialSkipped() != true && tutorialPlayed == false && startedPlaying == false) { movementScript.enabled = false; boostScript.enabled = false; jumpScript.enabled = false; tutorialEvent = soundEmitter.startEvent(tutorialSound, false); textureDisplay.tutorialTexture(tutorialHint); startedPlaying = true; } if (col.tag == "Player" && startedPlaying == true) { tutorialEventState = soundEmitter.eventState(tutorialEvent); if (tutorialEventState != PLAYBACK_STATE.PLAYING) { movementScript.enabled = true; boostScript.enabled = true; jumpScript.enabled = true; tutorialPlayed = true; //textureDisplay.tutorialTexture(null); Debug.Log("LOL"); } if (Input.GetButtonDown("Cancel")) { GlobalFuncVari.setTutorialSkipped(true); soundEmitter.stopEvent(tutorialEvent); //textureDisplay.tutorialTexture(null); movementScript.enabled = true; boostScript.enabled = true; jumpScript.enabled = true; } } }
// Update is called once per frame void Update() { if (Input.anyKey) { Application.LoadLevel("Start"); GlobalFuncVari.setTutorialSkipped(false); } }
void OnTriggerStay(Collider col) { if (col.tag == "Player") { tutorialEvent.getPlaybackState(out tutorialEventState); if (tutorialEventState == PLAYBACK_STATE.STOPPED) { movementScript.enabled = true; boostScript.enabled = true; tutorialPlayed = true; textureDisplay.tutorialTexture(null); } if (Input.GetButtonDown("Cancel")) { GlobalFuncVari.setTutorialSkipped(true); soundEmitter.stopEvent(tutorialEvent); textureDisplay.tutorialTexture(null); movementScript.enabled = true; boostScript.enabled = true; } float timePos; timePos = Time.time; if (timePos >= timer1 && timePos < timer2) { if (switch1 == false) { textureDisplay.tutorialTexture(tutorialHint2); switch1 = true; } } if (timePos >= timer2) { if (switch2 == false) { textureDisplay.tutorialTexture(tutorialHint3); switch2 = true; } } } }