コード例 #1
0
	public IEnumerator SlideEnd(){
		yield return new WaitForSeconds(slideDuration);
		introManager.fader.SetTrigger("FadeOut");
			Debug.Log("Fade out");
		yield return new WaitForSeconds(1.5f);
		introManager.NextSlide();
		this.gameObject.SetActive(false);
		StopCoroutine(SlideEnd());
	}
コード例 #2
0
    IEnumerator SlideChange()      //changes what appears on the slide without switching to a new slide
    {
        yield return(new WaitForSeconds(changeDelay));

        if (currentDisplay + 1 < variousDisplays.Count)
        {
            variousDisplays[currentDisplay].SetActive(false);
            currentDisplay++;
            variousDisplays[currentDisplay].SetActive(true);
        }
        else
        {
            currentDisplay++;
        }
        if (currentDisplay < numOfChanges)
        {
            StartCoroutine(SlideChange());             //TODO: is this alright?
            introManager.NextSlide();
        }
        else
        {
            Debug.Log("Stopped slide change");
            StopCoroutine(SlideChange());
        }
    }