コード例 #1
0
 /// <summary>
 /// Post a new high score to the remote server
 /// </summary>
 /// <param name="name"></param>
 /// <param name="score"></param>
 void NewHighScore(string name, int score)
 {
     HighScoreClient.ScorePair pair = new HighScoreClient.ScorePair();
     pair.Name  = name;
     pair.Score = score;
     remoteClient.PostNewHighScore(pair, LoadHighScores);
 }
コード例 #2
0
    //
    // Submit button
    public void Submit()
    {
        int score = GameScore.GetScore();

        // post high score
        string name = nameInput.text;

        HighScoreClient.ScorePair pair = new HighScoreClient.ScorePair();
        pair.Name  = name;
        pair.Score = score;

        highScoreClient.PostNewHighScore(pair, OnComplete);
    }