IEnumerator WaitToMove(OldPlayerMain playerMain) { playerMain.enabled = false; yield return(new WaitForSeconds(fadeInDelay)); blackFade.fadeBlack = true; blackFade.fading = true; yield return(new WaitForSeconds(moveDelay)); playerMain.transform.position = moveToPoint.position; mCam.transform.position = new Vector3(moveToPoint.position.x, moveToPoint.position.y + 7, moveToPoint.position.z - 30); yield return(new WaitForSeconds(fadeOutDelay)); blackFade.fadeBlack = false; blackFade.fading = true; yield return(new WaitForSeconds(endDelay)); playerMain.enabled = true; }
public void MovePlayer(OldPlayerMain playerMain) { StartCoroutine(WaitToMove(playerMain)); }