示例#1
0
        async void NextScene(APIStatus status)
        {
            if (Application.platform == RuntimePlatform.Android)
            {
                AndroidUtils.ShowToast("Start!");
            }
            switch (status)
            {
            case APIStatus.OK:
                await _sceneManager.LoadSceneAsync(SceneName.Map);

                break;

            case APIStatus.Unauthorized:
                await _sceneManager.LoadSceneAsync(SceneName.Authenticate);

                break;

            default:
                ShowError(status);
                return;
            }

            // Wait for 1 frame to make sure the next scene is loaded.
            // Otherwise hide animation doesn't work seemlessly.
            await UniTask.DelayFrame(1);

            _client.SceneLoadFinished();
        }