Example #1
0
        IEnumerator <WaitCommand> OnEnter()
        {
            yield return(CameraTransitions.FadeIn(_data.CameraManager.Rig.ScreenFader, _data.GameClock, _data.FaderSettings).AsWaitCommand());

            _data.ActiveNetwork.Shutdown();
            OnResume();
        }
Example #2
0
 private IEnumerator <WaitCommand> FadeIn()
 {
     yield return
         (CameraTransitions.FadeIn(_data.GameClock, _data.FaderSettings, lerp => {
         _data.CameraManager.Rig.ScreenFader.Opacity = lerp;
         _data.SoundMixer.SetVolume(SoundLayer.Effects, 1f - lerp);
     }).AsWaitCommand());
 }
Example #3
0
        IEnumerator <WaitCommand> OnEnter()
        {
            _data.View.gameObject.SetActive(true);

            _data.ViewModel.CheckMasterServerHealth();
            _data.ViewModel.Refresh();

            yield return(CameraTransitions.FadeIn(_data.CameraManager.Rig.ScreenFader, _data.GameClock, _data.FaderSettings).AsWaitCommand());

            _onPausePressed = _data.EventSystem.Listen <Events.OnBackPressed>(OnBackPressed);

            _data.ViewModel.RequestJoin       += OnRequestJoin;
            _data.ViewModel.RequestCancelJoin += OnRequestCancelJoin;
        }
Example #4
0
        // When exiting always transition to spawnpoint selection
        // Allow options menu to be enabled

        IEnumerator <WaitCommand> OnEnter()
        {
            _data.CourseEditor.enabled = true;

            var currentCameraTransform = _data.CameraManager.Rig.transform.MakeImmutable();

            _data.Mount.transform.Set(currentCameraTransform);
            _data.CameraManager.SwitchMount(_data.Mount);

            yield return(WaitCommand.WaitRoutine(CameraTransitions.FadeIn(_data.CameraManager.Rig.ScreenFader, _data.Clock, _data.FaderSettings)));

            _closeListener = _data.CourseEditor.CloseEditor.Subscribe(_ => {
                Machine.Transition(VoloStateMachine.States.SpawnScreen);
            });
        }
Example #5
0
        IEnumerator <WaitCommand> OnEnter()
        {
            _data.CameraManager.SwitchMount(_data.CameraMount.GetComponent <ICameraMount>());

            var spawnpointBillboards = _uiState.To(s => s.SpawnpointUIList).To(s => s.Items).Get();

            for (int i = 0; i < _spawnpoints.Count; i++)
            {
                var spawnpoint = _spawnpoints[i];
                spawnpointBillboards[i].SetActive(spawnpoint.IsDiscovered);
            }

            OnResume();

            yield return(WaitCommand.WaitRoutine(CameraTransitions.FadeIn(_data.CameraManager.Rig.ScreenFader, _data.MenuClock, _data.FaderSettings)));
        }
Example #6
0
        IEnumerator <WaitCommand> OnEnter(SpawnpointLocation spawnpoint)
        {
            _data.ChallengeAnnouncerUi.enabled        = true;
            _data.JoystickActivator.enabled           = false;
            _data.ThirdPersonCameraController.enabled = true;

            // TODO Don't spawn the player this is now the responsisiblity of the wingsuit state
            //yield return _data.PlayerPilotSpawner.Respawn(spawnpoint).AsWaitCommand();

            var environment = new PlayingEnvironment(
                spawnpoint: spawnpoint,
                pilot: null,
                parachuteConfig: _activeParachuteConfig.Get());

            _playingStateMachine.Transition(PlayingStates.FlyingWingsuit, environment, Maybe.Just(new RespawnRequest()));
            yield return(WaitCommand.WaitRoutine(CameraTransitions.FadeIn(_data.CameraManager.Rig.ScreenFader, _data.MenuClock, _data.FaderSettings)));
        }