private IEnumerator ExecuteCast()
        {
            RemotePlayerVisibilityState.HideRemotePlayers();
            sendCameraEvent(cinematicCameraFishingController);
            cinematicCameraFishingController.transform.position = player.transform.position;
            playerAnimator.SetInteger("PropMode", 3);
            fishingRodAnimator.SetInteger("PropMode", 3);
            yield return(new WaitForEndOfFrame());

            float castingAnimationTime = playerAnimator.GetCurrentAnimatorClipInfo(1)[0].clip.length;

            yield return(new WaitForSeconds(castingAnimationTime));

            setupStartingAnimatorValues();
            SetBobberHierarchy(doSet: true);
            rootTransform.localPosition = config.BobberLocationInWater;
            Vector3 hookPosition = GetFishPosition(currentPatternConfig.hookInterp);

            SetBobberPosition(hookPosition);
            _bobberAnimator.Play(ANIM_DROP);
            yield return(new WaitForEndOfFrame());

            float bobberDropAnimationLength = _bobberAnimator.GetCurrentAnimatorStateInfo(0).length;

            yield return(new WaitForSeconds(bobberDropAnimationLength * dropSplashFactor));

            fxSmallSplash.Play();
            yield return(new WaitForSeconds(bobberDropAnimationLength * (1f - dropSplashFactor)));

            _isCast = true;
            StartGameplay();
        }
Esempio n. 2
0
 public override void OnEnter()
 {
     dispatcher = Service.Get <EventDispatcher>();
     if (SuppressQuestNotifier)
     {
         dispatcher.DispatchEvent(new HudEvents.SuppressQuestNotifier(suppress: true, autoShow: true));
     }
     if (RemoveControls)
     {
         GameObject gameObject = GameObject.FindWithTag(UIConstants.Tags.UI_Tray_Root);
         if (gameObject != null)
         {
             StateMachineContext component = gameObject.GetComponent <StateMachineContext>();
             component.SendEvent(new ExternalEvent("Root", "minnpc"), checkDependencies: true);
         }
         Service.Get <EventDispatcher>().DispatchEvent(new UIDisablerEvents.DisableUIElementGroup("MainNavButtons"));
         Service.Get <EventDispatcher>().DispatchEvent(new UIDisablerEvents.DisableUIElement("ChatButtons"));
     }
     if (HideRemotePlayers)
     {
         RemotePlayerVisibilityState.HideRemotePlayers();
     }
     if (HideLocalPlayer)
     {
         Camera.main.cullingMask &= ~(1 << LayerMask.NameToLayer("LocalPlayer"));
     }
     if (HideInWorldText)
     {
         dispatcher.DispatchEvent(default(InWorldUIEvents.DisableInWorldText));
     }
     if (DisablePlayerCard)
     {
         dispatcher.DispatchEvent(new PlayerCardEvents.SetEnablePlayerCard(enable: false));
     }
     if (HideActionIndicators)
     {
         dispatcher.DispatchEvent(default(InWorldUIEvents.DisableActionIndicators));
     }
     Finish();
 }
Esempio n. 3
0
 public override void OnEnter()
 {
     RemotePlayerVisibilityState.HideRemotePlayers();
     Finish();
 }
Esempio n. 4
0
 private void hideRemotePlayers()
 {
     RemotePlayerVisibilityState.HideRemotePlayers();
 }