Exemplo n.º 1
0
    //public string GoToMultiplayerLobby(string s) {
    //    Application.LoadLevel("MultiplayerLobby");
    //    return "changing level";
    //}

    public string AddRandomWords(string count)
    {
        int c;

        if (!int.TryParse(count, out c))
        {
            c = 10;
        }
        var words = new List <PhraseSequence>(PhraseSetCollectionGameData.Default.AggregateAllWords()).PickN(c);

        foreach (var w in words)
        {
            PlayerDataConnector.CollectWord(w.Word);
        }

        return("Collected " + c + " words");
    }
Exemplo n.º 2
0
    public string AddRandomWordsAndPhrases(string count)
    {
        int c;

        if (!int.TryParse(count, out c))
        {
            c = 10;
        }
        var phrases = new List <PhraseSequence>(PhraseSetCollectionGameData.Default.AggregateAllWordsAndPhrases()).PickN(c);

        foreach (var p in phrases)
        {
            if (p.IsWord)
            {
                PlayerDataConnector.CollectWord(p.Word);
            }
            else
            {
                PlayerDataConnector.CollectPhrase(p);
            }
        }

        return("Collected " + c + " words and phrases.");
    }