예제 #1
0
    // Use this for initialization
    void Start()
    {
        timeElapsed  = transform.Find("TimeElapsedText").GetComponent <TextMeshProUGUI>();
        scale        = transform.Find("ScaleText").GetComponent <TextMeshProUGUI>();
        score        = transform.Find("ScoreText").GetComponent <TextMeshProUGUI>();
        defeated     = transform.Find("EnemiesDefeatedText").GetComponent <TextMeshProUGUI>();
        accuracy     = transform.Find("AccuracyText").GetComponent <TextMeshProUGUI>();
        misspellings = transform.Find("MisspelledNotesText").GetComponent <TextMeshProUGUI>();

        scale.text        = Scale.Name;
        timeElapsed.text  = "Duration of the game: " + GetTimeDurationString();
        score.text        = "Score: " + PlayerCloud.score;
        defeated.text     = "Defeated enemies: " + PlayerCloud.enemies_defeated;
        accuracy.text     = "Accuracy: " + Mathf.Round(PlayerCloud.GetAccuracy() * 100f) + "%";
        misspellings.text = "Misspellings: " + PlayerCloud.misspellings;
    }
예제 #2
0
 public void Back()
 {
     PlayerCloud.Restart();
     SceneManager.LoadScene(1);
 }
예제 #3
0
 public void SetCloud(PlayerCloud Cloud)
 {
     cloud = Cloud;
 }