Esempio n. 1
0
 // Update is called once per frame
 void Update()
 {
     if (touch.isTouched == true)
     {
         SceneChanger.Change(sceneToUnLoad, sceneToLoad, sub, delaytime);
     }
 }
Esempio n. 2
0
    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();
        }
    }
Esempio n. 3
0
 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);
 }
Esempio n. 4
0
 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);
     }
 }
Esempio n. 5
0
 void OnMouseDown()
 {
     if (Player.current.GetXPosition() - transform.position.x <= dis && Player.current.GetXPosition() - transform.position.x >= -dis)
     {
         SceneChanger.Change(scene2, scene1);
     }
 }
Esempio n. 6
0
 // Update is called once per frame
 void Update()
 {
     if (touch.isTouched == true)
     {
         SceneChanger.Change(sceneToUnLoad, sceneToLoad, sub, delaytime, newBGM, delay, loop, effectIndex);
     }
 }
Esempio n. 7
0
 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;
 }
Esempio n. 8
0
 public override void Execute(Machine machine)
 {
     if (machine.IfInteracted())
     {
         SceneManager.UnloadSceneAsync("C1S2");
         SceneChanger.Change("C1S3", "C1S4", "打开门后,一切都变了。", 4);
     }
 }
Esempio n. 9
0
    IEnumerator Finish()
    {
        manager.show("一切都准备好了,是时候继续前行了。", 2f);
        yield return(new WaitForSecondsRealtime(2f));

        SceneChanger.Change("02_", "TFP");
        yield return(null);
    }
Esempio n. 10
0
    IEnumerator OneFinish()
    {
        manager.show("总算可以出发了,希望自己一路顺利。", 2f);
        yield return(new WaitForSecondsRealtime(2f));

        SceneChanger.Change("01", "CG2");
        yield return(null);
    }
Esempio n. 11
0
 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();
     }
 }
Esempio n. 12
0
 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("踹也踹不开,伐开心。");
         }
     }
 }
Esempio n. 13
0
    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();
    }
Esempio n. 14
0
    // 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);
    }
Esempio n. 15
0
 private void OnMouseDown()
 {
     SceneChanger.Change("Menu", "levels");
 }
Esempio n. 16
0
 private void OnMouseDown()
 {
     SceneChanger.Change("levels", "CG1");
 }
Esempio n. 17
0
    IEnumerator f()
    {
        yield return(new WaitForSeconds(time));

        SceneChanger.Change(CGname, toChange);
    }
Esempio n. 18
0
 private void OnMouseDown()
 {
     SceneChanger.Change(s, "Menu");
 }
Esempio n. 19
0
 void OnMouseDown()
 {
     SceneChanger.Change(CGname, toChange);
 }