Example #1
0
 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);
         }
     }
 }
Example #2
0
    private void _OnFishSuccess(Fish.Fishes successFish)
    {
        OnFishSuccessEvent(successFish);
        Fish fishManager = FindObjectOfType <Fish>();

        fishManager.OnFishCaught(successFish);
    }
Example #3
0
 void OnFishCaught(Fish.Fishes fish)
 {
     if (index < hooks.Count)
     {
         hooks[index].sprite = GetSpriteForFish(fish);
         index++;
     }
 }
Example #4
0
    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);
        }
    }
Example #5
0
    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);
    }
Example #6
0
 private void OnFishFailure(Fish.Fishes fish)
 {
     this.SetState(State.IDLE);
     DestroyAllBobbers();
 }
Example #7
0
 private void _OnFishFailure(Fish.Fishes failureFish)
 {
     OnFishFailureEvent(failureFish);
 }