void Start() { ReferenceMGR = FindObjectOfType <Reference_of_MGR>(); DataMGR = ReferenceMGR.Data_MGR; PoolMGR = ReferenceMGR.Pool_MGR; BoardMGR = ReferenceMGR.Board_MGR; UiMGR = ReferenceMGR.UI_MGR; GridMGR = ReferenceMGR.Grid_MGR; StageMGR = ReferenceMGR.Stage_MGR; mFadeControl.Fadein_start(); StartCoroutine(Board_Manage_Rountine()); }
private IEnumerator Move_Stage_coru() { Setoff_obj.SetActive(false); gameMGR.UiMGR.mShop.onoff_shop(false); if (gameMGR.Game_round == 5) { while (true) { mTransform.position = Vector3.Lerp(mTransform.position, new Vector3(2, 0, 75), 0.025f); if (75 - transform.position.z < 1) { Move_coru = null; Round_Animation.SetBool("FADE", false); circle_a.SetActive(true); circle_b.SetActive(true); yield return(new WaitForSeconds(4)); mfadeControl.gameObject.SetActive(true); mfadeControl.Fadeout_start(); yield return(new WaitForSeconds(3)); Camera.main.gameObject.SetActive(false); canvas_.worldCamera = BossCam_; BossCam_.gameObject.SetActive(true); mfadeControl.Fadein_start(); Setoff_obj.SetActive(true); gameMGR._state = Board_Define.GAME_READY; mTransform.position = new Vector3(0, 0, mMove_Pos[gameMGR.Game_round - 2]); yield break; } yield return(null); } } else { Round_Text.text = Text_Define.STAGE + gameMGR.Game_round; Round_Animation.SetBool("FADE", true); while (true) { //transform.Translate(Vector3.forward * Time.deltaTime*0.1f); mTransform.position = Vector3.Lerp(mTransform.position, new Vector3(0, 0, mMove_Pos[gameMGR.Game_round - 2]), 0.03f); Debug.Log(gameMGR.Game_round); if (mMove_Pos[gameMGR.Game_round - 2] - transform.position.z < 1) { Setoff_obj.SetActive(true); //mTransform.position = new Vector3(0, 0, mMove_Pos[gameMGR.Game_round-2]); gameMGR._state = Board_Define.GAME_READY; Move_coru = null; Round_Animation.SetBool("FADE", false); yield break; } yield return(null); } } }