示例#1
0
    void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.tag == "Player")
        {
            waiting = true;
            fade.FadeOut();

            GetComponent <AudioSource>().Play();

            Hitstop.current.HitstopFor(2);

            lev_con = FindObjectOfType <LevelController>();
        }
    }
示例#2
0
    // Update is called once per frame
    void Update()
    {
        currentTime += (Time.deltaTime / gameLengthInSeconds) * daySpeed;
        //print(currentTime);

        int idx = (int)Mathf.Floor(currentTime * clock.Length);

        if (idx < clock.Length)
        {
            clockImage.sprite = clock[idx];
        }
        if (currentTime >= 1 && !dayEnded)
        {
            dayEnded = true;
            print("Day Ends");
            ftb.FadeOut();
            StartCoroutine(NextDay());
        }
    }
    private IEnumerator SwitchSceneCrt()
    {
        yield return(fader.FadeOut());

        SceneManager.LoadScene(scene, LoadSceneMode.Single);
    }
示例#4
0
    private IEnumerator RespawnCrt()
    {
        yield return(StartCoroutine(fader.FadeOut()));

        SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
    }