// Update is called once per frame void Update() { if (touch.isTouched == true) { SceneChanger.Change(sceneToUnLoad, sceneToLoad, sub, delaytime); } }
IEnumerator Animate() { AudioSource audioSource = FindObjectOfType <AudioSource>(); if (audioSource.clip != bgMusic) { audioSource.clip = bgMusic; audioSource.Play(); } yield return(new WaitForSeconds(1f)); if (ac2 != null) { AudioSource.PlayClipAtPoint(ac2, Camera.main.transform.position); } yield return(new WaitForSeconds(0.5f)); if (ac1 != null) { AudioSource.PlayClipAtPoint(ac1, Camera.main.transform.position); } yield return(new WaitForSeconds(1f)); if (sceneChanger != null) { sceneChanger.gameObject.SetActive(true); sceneChanger.Change(); } }
private void OnMouseDown() { MyCamera.isFixing = true; GameObject.FindGameObjectWithTag("music").GetComponent <RectTransform>().position = new Vector3(-100, -100, 0); SceneManager.LoadScene("PlayerScene", LoadSceneMode.Additive); SceneChanger.Change("标题界面", "C1S1", "我不知道发生了什么", 3.5f); }
void OnMouseOver() { if ((Input.GetMouseButtonDown(0) || Input.GetMouseButtonDown(1)) && Player.current.GetXPosition() - transform.position.x <= dis && Player.current.GetXPosition() - transform.position.x >= -dis) { SceneChanger.Change(scene2, scene1, sub, subDelay, newBGM, delay, loop, effectIndex); } }
void OnMouseDown() { if (Player.current.GetXPosition() - transform.position.x <= dis && Player.current.GetXPosition() - transform.position.x >= -dis) { SceneChanger.Change(scene2, scene1); } }
// Update is called once per frame void Update() { if (touch.isTouched == true) { SceneChanger.Change(sceneToUnLoad, sceneToLoad, sub, delaytime, newBGM, delay, loop, effectIndex); } }
private void OnMouseDown() { GameObject.FindGameObjectWithTag("button").GetComponent <SpriteRenderer>().enabled = true; MyCamera.isFixing = true; SceneManager.LoadScene("PlayerScene", LoadSceneMode.Additive); SceneChanger.Change("标题界面", "C1S1", "我不知道我在哪里", 3.5f, "BGM2", 1, true, 2); 厨师.counter = 1; }
public override void Execute(Machine machine) { if (machine.IfInteracted()) { SceneManager.UnloadSceneAsync("C1S2"); SceneChanger.Change("C1S3", "C1S4", "打开门后,一切都变了。", 4); } }
IEnumerator Finish() { manager.show("一切都准备好了,是时候继续前行了。", 2f); yield return(new WaitForSecondsRealtime(2f)); SceneChanger.Change("02_", "TFP"); yield return(null); }
IEnumerator OneFinish() { manager.show("总算可以出发了,希望自己一路顺利。", 2f); yield return(new WaitForSecondsRealtime(2f)); SceneChanger.Change("01", "CG2"); yield return(null); }
private void OnTriggerEnter2D(Collider2D collision) { if (!triggered && collision.CompareTag("Player")) { triggered = true; CharacterController2D cc = player.GetComponent <CharacterController2D>(); cc.ValidateJump(); cc.controlledFall = false; sceneChager.gameObject.SetActive(true); sceneChager.Change(); } }
public override void Execute(Machine machine) { if (machine.IfInteracted()) { if (isopen) { SceneManager.UnloadSceneAsync("C1S2"); SceneChanger.Change("C1S3", "C1S4", "打开门后,一切都变了。", 4, "BGM4", 2, false, 4); } else { SubtitleSystem.ShowSubtitle("踹也踹不开,伐开心。"); } } }
IEnumerator EndGame() { yield return(new WaitForSeconds(2f)); animator.SetBool("knockedback", false); animator.SetBool("dead", false); yield return(new WaitForSeconds(1f)); forceCough = true; player.forceCough = true; yield return(new WaitForSeconds(2f)); forceCough = true; player.forceCough = true; yield return(new WaitForSeconds(1f)); sceneChanger.gameObject.SetActive(true); sceneChanger.Change(); }
// Update is called once per frame // void Update () { // for (int i = 0; i < transform.childCount-1; i++) { // transform.GetChild (i).gameObject.active = false; // transform.GetChild (i + 1).gameObject.active = true; // Debug.Log (i); // } // // } IEnumerator MyCoroutine() { GameSystem.IStarted(); Camera.main.transform.position = (Vector3)((Vector2)transform.position) + Vector3.back * 10; yield return(new WaitForSecondsRealtime(2f)); for (int i = 0; i < transform.childCount - 1; i++) { transform.GetChild(i).gameObject.SetActive(false); transform.GetChild(i + 1).gameObject.SetActive(true); yield return(new WaitForSecondsRealtime(0.2f)); } yield return(new WaitForSecondsRealtime(2f)); GameSystem.IEnded(); Transform t = Player.current.GetComponentInParent <Leg>().transform; Vector3 v = t.position; v.x = 7; t.position = v; SceneChanger.Change("C1S4", "C1S5", "突然我从床上惊醒,天已经亮了。", 3f); yield return(null); }
private void OnMouseDown() { SceneChanger.Change("Menu", "levels"); }
private void OnMouseDown() { SceneChanger.Change("levels", "CG1"); }
IEnumerator f() { yield return(new WaitForSeconds(time)); SceneChanger.Change(CGname, toChange); }
private void OnMouseDown() { SceneChanger.Change(s, "Menu"); }
void OnMouseDown() { SceneChanger.Change(CGname, toChange); }