void showNewCutscene() { currentlyDisplayingText = 0; //print (goalText [0]); SceneFadeInOut fader = GameObject.Find("screenFader").GetComponent <SceneFadeInOut> (); if (cutscenePos >= cutscenes.Length) { fader.EndScene(); //print ("dONE W CUTSCENES"); SceneManager.LoadScene("MainMenu", LoadSceneMode.Single); } else { SpriteRenderer showCutscene = GameObject.Find("Cutscene").GetComponent <SpriteRenderer> (); showCutscene.sprite = cutscenes[cutscenePos++]; goalText = allCutsceneText [cutscenePos]; if (cutscenePos == 2) { ambientAudioSource.clip = magicAudio; ambientAudioSource.Play(); fader.EndSceneFast(); } else { fader.EndScene(); } } }
public void Dead() { if (!audio.isPlaying) { audio.clip = gameOverClip; audio.Play(); } puc.enabled = false; cam.GetComponent <Camera2DFollow>().enabled = false; cam.GetComponent <AudioSource>().Stop(); inout.EndScene(); }
void LiftActivation() { // Increment the timer by the amount of time since the last frame. timer += Time.deltaTime; // If the timer is greater than the amount of time before the lift should start... if (timer >= timeToLiftStart) { // ... stop the player and the camera moving and parent the player to the lift. player.GetComponent <ThirdPersonCharacter>().Disable(true); player.transform.parent = transform; // Move the lift upwards. transform.Translate(Vector3.up * liftSpeed * Time.deltaTime); // If the audio clip isn't playing... if (!GetComponent <AudioSource>().isPlaying) { // ... play the clip. AudioManager.instance.PlaySound(GetComponent <AudioSource>(), liftSound); } // If the timer is greater than the amount of time before the level should end... if (timer >= timeToEndLevel) { // ... call the EndScene function. sceneFadeInOut.EndScene(); } } }
void LiftActivation() { // Increment the timer by the amount of time since the last frame. timer += Time.deltaTime; // If the timer is greater than the amount of time before the lift should start... if (timer >= timeToLiftStart) { // ... stop the player and the camera moving and parent the player to the lift. playerAnim.SetFloat(hash.speedFloat, 0f); camMovement.enabled = false; player.transform.parent = transform; // Move the lift upwards. transform.Translate(Vector3.up * liftSpeed * Time.deltaTime); // If the audio clip isn't playing... if (!audioSource.isPlaying) { // ... play the clip. audioSource.Play(); } // If the timer is greater than the amount of time before the level should end... if (timer >= timeToEndLevel) { // ... call the EndScene function. sceneFadeInOut.EndScene(); } } }
// Update is called once per frame void Update() { if (timer - Time.time < 0.5f) { SceneFader.EndScene(); } }
IEnumerator NewLevel() { yield return(new WaitForSeconds(1)); //Application.LoadLevel(Application.loadedLevel + 1); fade.EndScene(); }
// Update is called once per frame void Update() { if (Time.time - now > 3 || Input.GetKeyDown("space")) { other.EndScene(); } }
void LevelReset() { timer += Time.deltaTime; if (timer >= resetAfterDeathTime) { sceneFadeInOut.EndScene(); } }
void LevelReset() { timer += Time.deltaTime; if (timer >= waitTime) { sceneFader.EndScene(); } }
void LevelReset() { Debug.Log("AA"); timer += Time.deltaTime; if (timer >= waitTime) { sceneFader.EndScene(); } }
void LevelReset() { // Increment the timer. timer += Time.deltaTime; //If the timer is greater than or equal to the time before the level resets... if (timer >= resetAfterDeathTime) { // ... reset the level. sceneFadeInOut.EndScene(); } }
void Update() { if (timer < spawnEffectTime / 2) { timer += Time.deltaTime; } else if (timer < spawnEffectTime) { timer += Time.deltaTime; sceneFade.EndScene(false); } else { sceneFade.EndScene(false); } _renderer.material.SetFloat(shaderProperty, fadeIn.Evaluate(Mathf.InverseLerp(0, spawnEffectTime, timer))); if (_weaponRenderer) { _weaponRenderer.material.SetFloat(shaderProperty, fadeIn.Evaluate(Mathf.InverseLerp(0, spawnEffectTime, timer))); } }
void LevelReset() { // Increment the timer. //incremente el temporizador. timer += Time.deltaTime; //If the timer is greater than or equal to the time before the level resets... //Si el temporizador es mayor o igual a le tiempo antes de que se restablezca el nivel... if (timer >= resetAfterDeathTime) { // ... reset the level.//restablezca el nivel. sceneFadeInOut.EndScene(); //llama la funcion EndScene del script sceneFadeInOut } }
private void OnLeftRoom() { if (CancelButton != null && Launch.Engine.activeInHierarchy == false) { CancelButton.interactable = false; CancelButton.GetComponent <ChangeMenu>().Change(); } else { FadeOut(); SceneFade.EndScene("Menu"); DestroyImmediate(gameObject); } }
void showNewCutscene() { currentlyDisplayingText = 0; //print (goalText [0]); SceneFadeInOut fader = GameObject.Find("screenFader").GetComponent <SceneFadeInOut> (); if (cutscenePos >= cutscenes.Length) { fader.EndScene(); //print ("dONE W CUTSCENES"); SceneManager.LoadScene("SecondLevel", LoadSceneMode.Single); } else { SpriteRenderer showCutscene = GameObject.Find("Cutscene").GetComponent <SpriteRenderer> (); showCutscene.sprite = cutscenes[cutscenePos++]; goalText = allCutsceneText [cutscenePos]; fader.EndScene(); } }
// Update is called once per frame void Update() { int fingerCount = 0; foreach (Touch touch in Input.touches) { if (touch.phase == TouchPhase.Began && start.HitTest(touch.position)) { fadeScript.StopClearing(); fadeScript.EndScene(); } } if (start.HitTest(Input.mousePosition, Camera.main)) { fadeScript.StopClearing(); fadeScript.EndScene(); } if (fingerCount > 0) { print("User has " + fingerCount + " finger(s) touching the screen"); } if (Input.GetKey(KeyCode.Space)) { Application.LoadLevel(1); } if (Input.GetKey(KeyCode.Escape)) { Application.Quit(); } }
void LiftActivation() { timer += Time.deltaTime; if (timer >= timeToLiftStart) { playerAnim.SetFloat(hash.speedFloat, 0f); cameraMovement.enabled = false; player.transform.parent = transform; transform.Translate(Vector3.up * liftSpeed * Time.deltaTime); if (!audioS.isPlaying) { audioS.Play(); } if (timer >= timeToEndLevel) { sceneFadeInOut.EndScene(); } } }
void LiftActivation() { var audio = this.gameObject.GetComponent <AudioSource> (); timer += Time.deltaTime; if (timer >= timeToLiftStart) { playerAnim.SetFloat(hash.speedFloat, 0f); camMovement.enabled = false; player.transform.parent = transform; transform.Translate(Vector3.up * liftSpeed * Time.deltaTime); if (!audio.isPlaying) { audio.Play(); } if (timer >= timeToEndLevel) { sceneFadeInOut.EndScene(); } } }
// Use this for initialization void Start() { SceneFadeInOut fader = GameObject.Find("screenFader").GetComponent <SceneFadeInOut> (); fader.EndScene(); }