private void OnBiteEnd(bool hooked) { if (!hooked) { SetState(State.IDLE); } else { SetState(State.HOOKED); Fish fishManager = FindObjectOfType <Fish>(); if (caughtFishCount < 3 || lastCastPower > 4) { Fish.Fishes fish = fishManager.GetRandomFish(); Node conversation = fishManager.GetConversation(fish); dialogRenderer.StartConversation(conversation); if (fish != Fish.Fishes.DAD) { this.playerAudioSource.PlayOneShot(this.caughtAudioClip); } else { this.playerAudioSource.volume = dadVolume; this.playerAudioSource.PlayOneShot(this.dadAudioClip); } } else { dialogRenderer.StartConversation(castFurtherConversation); } } }
private void _OnFishSuccess(Fish.Fishes successFish) { OnFishSuccessEvent(successFish); Fish fishManager = FindObjectOfType <Fish>(); fishManager.OnFishCaught(successFish); }
void OnFishCaught(Fish.Fishes fish) { if (index < hooks.Count) { hooks[index].sprite = GetSpriteForFish(fish); index++; } }
private void OnFishSuccess(Fish.Fishes fish) { this.SetState(State.IDLE); DestroyAllBobbers(); caughtFishCount++; if (caughtFishCount == 3 || (caughtFishCount == 1 && FindObjectOfType <Fish>().justBoot)) { PlayInnerPowerDialog(); } if (fish == Fish.Fishes.DAD) { FindObjectOfType <LevelChanger>().FadeToLevel(1); } }
private Sprite GetSpriteForFish(Fish.Fishes fish) { switch (fish) { case Fish.Fishes.BOOT: return(sprites[0]); case Fish.Fishes.JIM: return(sprites[1]); case Fish.Fishes.KAT: return(sprites[2]); case Fish.Fishes.DAD: return(sprites[3]); } return(null); }
private void OnFishFailure(Fish.Fishes fish) { this.SetState(State.IDLE); DestroyAllBobbers(); }
private void _OnFishFailure(Fish.Fishes failureFish) { OnFishFailureEvent(failureFish); }