コード例 #1
0
    public void getNewSentence(int round)
    {
        Sentence = lines[Random.Range(0, lines.Length)];
        splitSentence(Sentence.ToLower());
        // Check if Sentence equals
        if (keywords.Length != round || sentencesUsed.Contains(Sentence))
        {
            getNewSentence(round);
        }

        sentencesUsed.Add(Sentence);
        keywordsShuffled.Clear();

        // Add Keywords
        for (int i = 0; i < keywords.Length; i++)
        {
            keywordsShuffled.Add(keywords[i]);
        }

        shuffleKeywords();

        vhand = gameObject.GetComponent <VisualsHandler>();
        vhand.clearText();
        vhand.loadKeywords();
        vhand.addText();
    }
コード例 #2
0
    private void Start()
    {
        GetComponent <HandlePlayers>().orderPlayersByRank();
        vh = gameObject.GetComponent <VisualsHandler>();

        HandlePlayers hp = GetComponent <HandlePlayers>();

        round = hp.round;
        int friendlyRound = round + 1;

        roundText.text = "ROUND: " + friendlyRound.ToString();

        audioData = GetComponent <AudioSource>();
        round1.Play(0);
    }