private void Update() { if (_gameplayState == FishingGameplayStates.Catch) { _circleT += Time.deltaTime; for (int i = 0; i < _fishes.Count; i++) { FishingFish fishingFish = _fishes[i]; float t = _circleT * fishingFish.speed * config.baseFishSpeed * currentPatternConfig.baseSpeed + fishingFish.offsetT; Vector3 fishPosition = GetFishPosition(t); fishingFish.SetPosition(fishPosition); } bool flag = GetFish() != null; _bobberAnimator.SetBool(PARAM_IS_ATTACKING, flag); if (flag && !fxUnderBobber.isPlaying) { fxUnderBobber.Play(); eventDispatcher.DispatchEvent(default(FishingEvents.PulseBobberButton)); playSoundEffect("SFX/Player/FishingRod/NibbleBubbles"); } else if (!flag && fxUnderBobber.isPlaying) { fxUnderBobber.Stop(); eventDispatcher.DispatchEvent(default(FishingEvents.StopBobberButtonPulse)); } } else if (_gameplayState == FishingGameplayStates.Reel) { float num = config.baseFishReelStrength * _fishes[_reelFishIndex].reelStrength; _reelValue += Time.deltaTime * num; if (_reelValue >= config.reelExtremes.y) { reelIn(null); } reelSpring.SetSpringGoal(_reelValue); } }
private void hideGameAssets() { fishPrefab.SetPosition(Vector3.down * 100f); }