Example #1
0
    public void CatchFish(FishDataObject fish)
    {
        _recentlyCaughtFish.Add(fish);
        if (_recentlyCaughtFish.Count > 3)
        {
            _recentlyCaughtFish.RemoveAt(0);
        }

        fish.data.saveData.numberCaught++;
        if (!fish.data.saveData.unlocked)
        {
            fish.data.saveData.unlocked               = true;
            fish.data.saveData.timeFirstCaughtHours   = System.DateTime.Now.Hour;
            fish.data.saveData.timeFirstCaughtMinutes = System.DateTime.Now.Minute;
            // show phone and stuff
            phoneManager.UpdateProfileCell(fish);
            phoneManager.SetTargetProfile(fish);
            youGotAMatchScreen.ShowSuccess(fish, goToPhone: true);
            OneShotManager.PlayOneShot(catchUnlockOneShot);
        }
        else
        {
            youGotAMatchScreen.ShowSuccess(fish);
            OneShotManager.PlayOneShot(catchSuccessOneShot);
        }
    }