コード例 #1
0
 private void HandleGameEnd()
 {
     letterManager.ShowLetter(currentLetter, toggleLetter);
     endScreen.SetActive(true);
     gamestuff.SetActive(false);
     endGame.SetActive(true);
     if (personAHappy && personBHappy && points > 30)
     {
         endScreen.GetComponent <SpriteRenderer>().color = color_scheme.GetBg1();
         endText.text = "Well done!! \n\n" + personA + " and " + personB + " made progress in understanding each others' feelings and it seems like their love will go on! \n\nYou finished this appointment on time with " + timeLeft + " seconds to spare and you got a very good online review for scoring " + points + " in this session. \n\n"
                        + "To go to your next appointment, refresh.";
     }
     else if (personAHappy && personBHappy)
     {
         endScreen.GetComponent <SpriteRenderer>().color = color_scheme.GetBg2();
         endText.text = "Well done!! \n\n" + personA + " and " + personB + " made progress in understanding each others' feelings and it seems like their love will go on! \n\nYou finished this appointment on time with " + timeLeft + " seconds to spare and you got a very good online review DESPITE scoring " + points + " in this session. \n\n"
                        + "To go to your next appointment, refresh.";
     }
     else if (personAHappy || personBHappy && points > 30)
     {
         endScreen.GetComponent <SpriteRenderer>().color = color_scheme.GetBg3();
         endText.text = "Nice try! \n\n" + personA + " and " + personB + " made some progress in understanding each others' feelings but there is a lot of work to be done. \n\nYou got a positive online review for your help and you scored " + points + " in this session. \n\n"
                        + "To go to your next appointment, refresh.";
     }
     else if (points > 30)
     {
         endScreen.GetComponent <SpriteRenderer>().color = Color.gray;
         endText.color = Color.white;
         endText.text  = "Nice try! \n\n" + personA + " and " + personB + " did not make much progress in understanding each other, but you got a positive online review for your help by scoring " + points + " in this session. \n\n"
                         + "To go to your next appointment, refresh.";
     }
     else
     {
         endScreen.GetComponent <SpriteRenderer>().color = Color.black;
         endText.color = Color.white;
         endText.text  = "Too bad! \n\n" + personA + " and " + personB + " did not make much progress in understanding each other, and you got a negative online review for scoring " + points + " in this session. \n\n"
                         + "To go to your next appointment, press R.";
     }
 }