예제 #1
0
    //--------------------------------------
    //  EVENTS
    //--------------------------------------

    private void onLeaderBoardScoreFailed(string array)
    {
        ISN_PlayerScoreLoadedResult result = new ISN_PlayerScoreLoadedResult();

        OnPlayerScoreLoaded(result);
        dispatcher.dispatch(GAME_CENTER_LEADER_BOARD_SCORE_LOADED, result);
    }
예제 #2
0
 private void OnPlayerScoreLoaded(ISN_PlayerScoreLoadedResult result)
 {
     if (result.IsSucceeded)
     {
         GCScore score = result.loadedScore;
         IOSNativePopUpManager.showMessage("Leader Board " + score.leaderboardId, "Score: " + score.score + "\n" + "Rank:" + score.rank);
     }
 }
예제 #3
0
    private void OnLeaderboardScoreLoaded(CEvent e)
    {
        ISN_PlayerScoreLoadedResult result = e.data as ISN_PlayerScoreLoadedResult;

        if (result.IsSucceeded)
        {
            GCScore score = result.loadedScore;
            IOSNativePopUpManager.showMessage("Leaderboard " + score.leaderboardId, "Score: " + score.score + "\n" + "Rank:" + score.rank);
        }
    }
예제 #4
0
    private void OnPlayerScoreLoaded(ISN_PlayerScoreLoadedResult result)
    {
        if (result.IsSucceeded)
        {
            GCScore score = result.loadedScore;
            IOSNativePopUpManager.showMessage("Leaderboard " + score.leaderboardId, "Score: " + score.score + "\n" + "Rank:" + score.rank);

            Debug.Log("double score representation: " + score.GetDoubleScore());
            Debug.Log("long score representation: " + score.GetLongScore());

            if (score.leaderboardId.Equals(leaderBoardId2))
            {
                Debug.Log("Updating leaderboard 2 score");
                LB2BestScores = score.GetLongScore();
            }
        }
    }
예제 #5
0
    private void onLeaderBoardScore(string array)
    {
        string[] data;
        data = array.Split("," [0]);

        string lbId     = data[0];
        string scoreVal = data[1];
        int    rank     = System.Convert.ToInt32(data[2]);


        GCBoardTimeSpan  timeSpan   = (GCBoardTimeSpan)System.Convert.ToInt32(data[3]);
        GCCollectionType collection = (GCCollectionType)System.Convert.ToInt32(data[4]);

        GCLeaderBoard board;

        if (_leaderboards.ContainsKey(lbId))
        {
            board = _leaderboards[lbId];
        }
        else
        {
            board = new GCLeaderBoard(lbId);
            _leaderboards.Add(lbId, board);
        }


        GCScore score = new GCScore(scoreVal, rank, timeSpan, collection, lbId, player.playerId);

        board.UpdateScore(score);
        board.UpdateCurrentPlayerRank(rank, timeSpan, collection);


        ISN_PlayerScoreLoadedResult result = new ISN_PlayerScoreLoadedResult(score);

        OnPlayerScoreLoaded(result);
        dispatcher.dispatch(GAME_CENTER_LEADER_BOARD_SCORE_LOADED, result);
    }
예제 #6
0
	private void onLeaderboardScore(string array) {

		string[] data;
		data = array.Split("," [0]);

		string lbId = data[0];
		string scoreVal = data[1];
		int rank = System.Convert.ToInt32(data[2]);


		GCBoardTimeSpan timeSpan = (GCBoardTimeSpan) System.Convert.ToInt32(data[3]);
		GCCollectionType collection = (GCCollectionType) System.Convert.ToInt32(data[4]);

		GCLeaderboard board;
		if(_leaderboards.ContainsKey(lbId)) {
			board = _leaderboards[lbId];
		} else {
			board =  new GCLeaderboard(lbId);
			_leaderboards.Add(lbId, board);
		}


		GCScore score =  new GCScore(scoreVal, rank, timeSpan, collection, lbId, Player.PlayerId);

		board.UpdateScore(score);
		board.UpdateCurrentPlayerRank(rank, timeSpan, collection);
	

		ISN_PlayerScoreLoadedResult result = new ISN_PlayerScoreLoadedResult (score);
		OnPlayerScoreLoaded (result);
		Dispatcher.dispatch (GAME_CENTER_LEADERBOARD_SCORE_LOADED, result);
	}
예제 #7
0
	//--------------------------------------
	//  EVENTS
	//--------------------------------------

	private void onLeaderboardScoreFailed(string array) {
		ISN_PlayerScoreLoadedResult result = new ISN_PlayerScoreLoadedResult ();
		OnPlayerScoreLoaded (result);
		Dispatcher.dispatch (GAME_CENTER_LEADERBOARD_SCORE_LOADED, result);
	}
예제 #8
0
	private void OnPlayerScoreLoaded (ISN_PlayerScoreLoadedResult result) {
		if(result.IsSucceeded) {
			GCScore score = result.loadedScore;
			IOSNativePopUpManager.showMessage("Leaderboard " + score.leaderboardId, "Score: " + score.score + "\n" + "Rank:" + score.rank);
			
			Debug.Log("double score representation: " + score.GetDoubleScore());
			Debug.Log("long score representation: " + score.GetLongScore());
			
			if(score.leaderboardId.Equals(leaderBoardId2)) {
				Debug.Log("Updating leaderboard 2 score");
				LB2BestScores = score.GetLongScore();
				
			}
		}
	}