private IEnumerator SceneOpening() { for (int i = 0; i < canvas.transform.childCount; i++) { GameObject child; child = canvas.transform.GetChild(i).gameObject; if (child.activeSelf) { indexList.Add(i); child.SetActive(false); } } CFadeInOut.FadeIn(3f); skipButton.SetActive(true); float distance = endOrthographicSize - startOrthographicSize; playerMovement.WakeUp(); cineCamera.m_Lens.OrthographicSize = startOrthographicSize; yield return(new WaitForSeconds(startDelay)); while (cineCamera.m_Lens.OrthographicSize < endOrthographicSize - (distance / cuts)) { cineCamera.m_Lens.OrthographicSize += distance / cuts; yield return(new WaitForSeconds(delayTime)); } CloseOpening(); skipButton.SetActive(false); }
// Start is called before the first frame update void Start() { if (instance == null) { instance = this; } PlayFadeIn(); }
public void OnTriggerEnter2D(Collider2D collision) { if (collision.CompareTag(KDefine.TAG_PLAYER)) { Debug.Log("포탈"); player = collision.GetComponent <CMovement>(); player.transform.position = transform.position; player.EnterPortal(); if (this.chapterManager != null && !bIsFinal) { Invoke("MoveStage", 2f); CFadeInOut.Fade(2f, 2f); } else if (this.chapterManager != null && bIsFinal) { Invoke("MoveChapter", 2f); CFadeInOut.Fade(2f, 2f); } } }