Exemple #1
0
    private IEnumerator TeleportToStart()
    {
        yield return(new WaitForSecondsRealtime(2.0f));

        OVRCameraRig  rig = FindObjectOfType <OVRCameraRig>();
        OVRScreenFade _screenFadeScript = rig.GetComponent <OVRScreenFade>();

        if (_screenFadeScript != null)
        {
            _screenFadeScript.OnLevelFinishedLoading(0);
        }

        Debug.Log($"[OneCellClass] Teleport player back at start. Time = {Time.fixedTime - TheCellGameMgr.instance.GetGameStartTime()}");
        TheCellGameMgr.instance.TeleportToStart();
    }