예제 #1
0
    public void CheckDaySpecificConstraints()
    {
        switch (CurrDay)
        {
        case 2:
            if (currSex != Sex.Male)
            {
                playerInfo.IncreaseIncorrect();
            }
            else if (currAge != Age.Young)
            {
                playerInfo.IncreaseIncorrect();
            }
            break;

        case 3:
            if (currSex == Sex.Male && currHobby == Hobbies.Anime && currAge == Age.Old)
            {
                playerInfo.IncreaseIncorrect();

                switch (playerInfo.incorrectCount)
                {
                case 1:
                    ShowRecordingWarning();
                    break;

                case 2:
                    // all profits are taken away and no more profits for the day
                    playerInfo.recordedViolation = true;
                    playerInfo.currProfitForDay  = 0;
                    ShowRecordingWarning2();
                    break;

                case 3:
                    // game over
                    playerInfo.currState = EndStates.TooManyStrikes;
                    StartCoroutine(transitionManager.TransitionScene("BadEnd"));
                    break;
                }
            }


            break;

        default:
            break;

        case 4:
            if (currHobby == Hobbies.Fortnite)
            {
                playerInfo.IncreaseIncorrect();
                //Also add another credit because it's double day
                playerInfo.IncreaseMoney();
            }
            break;

        case 5:
            if (currSex != Sex.Female || currHobby != Hobbies.Dabbing || currAge != Age.Young)
            {
                playerInfo.IncreaseIncorrect();

                if (playerInfo.incorrectCount == 2)
                {
                    audioManager.PlayScarySFX1();
                    recordingIcon.GetComponent <Image>().color = Color.black;
                }
                else if (playerInfo.incorrectCount > 2)
                {
                    audioManager.PlayScarySFX2();
                    StartCoroutine(transitionManager.ScaryFade("MainMenu"));
                }
            }
            break;

        case 7:
            if (currHobby != Hobbies.Dabbing)
            {
                if (currAge != Age.Young || currEd != Education.HighSchool)
                {
                    playerInfo.IncreaseIncorrect();
                }
            }
            break;

        case 6:
            break;
        }
    }