コード例 #1
0
ファイル: Api.cs プロジェクト: jclin/FlappyBird
        /// <summary>
        /// Returns a Skillz Match Object
        /// </summary>
        public static Match GetMatchInfo()
        {
            if (_matchInfo == null)
            {
                string matchInfo = Marshal.PtrToStringAnsi(_getMatchInfo());
                Dictionary <string, object> matchInfoDict = DeserializeJSONToDictionary(matchInfo);
                _matchInfo = new Match(matchInfoDict);
            }

            return(_matchInfo);
        }
コード例 #2
0
ファイル: Api.cs プロジェクト: jclin/FlappyBird
 /// <summary>
 /// Call this method when a player finishes a multiplayer game. This will report the result of the game
 /// to the Skillz server, and return the player to the Skillz portal.
 /// </summary>
 ///
 /// <param name="score">A float representing the score a player achieved in the game.</param>
 public static void FinishTournament(float score)
 {
     _displayTournamentResultsWithFloatScore(score);
     _matchInfo = null;
 }
コード例 #3
0
ファイル: Api.cs プロジェクト: jclin/FlappyBird
 /// <summary>
 /// Call this method when a player finishes a multiplayer game. This will report the result of the game
 /// to the Skillz server, and return the player to the Skillz portal.
 /// </summary>
 ///
 /// <param name="score">A string representing the score a player achieved in the game.</param>
 public static void FinishTournament(string score)
 {
     _displayTournamentResultsWithStringScore(score);
     _matchInfo = null;
 }
コード例 #4
0
ファイル: Api.cs プロジェクト: jclin/FlappyBird
 /// <summary>
 /// Call this method to make the player forfeit the game, returning him to the Skillz portal.
 /// </summary>
 public static void AbortGame()
 {
     _notifyPlayerAbortWithCompletion();
     _matchInfo = null;
 }