Ejemplo n.º 1
0
 public GP_ParticipantResult(string[] data, int index)
 {
     _ParticipantId = data[index];
     _Placing       = Convert.ToInt32(data[index + 1]);
     _Result        = (GP_TBM_ParticipantResult)Convert.ToInt32(data[index + 2]);
     _VersionCode   = Convert.ToInt32(data[index + 3]);
 }
Ejemplo n.º 2
0
 public GP_ParticipantResult(int versionCode, string participantId, GP_TBM_ParticipantResult result, int placing)
 {
     _ParticipantId = participantId;
     _Result        = result;
     _Placing       = placing;
     _VersionCode   = versionCode;
 }
Ejemplo n.º 3
0
    public void FinishMatch(string matchId, byte[] matchData, params UM_TMB_ParticipantResult[] results)
    {
        List <GP_ParticipantResult> resultsList = new List <GP_ParticipantResult>();

        foreach (UM_TMB_ParticipantResult r in results)
        {
            GP_TBM_ParticipantResult result = GP_TBM_ParticipantResult.MATCH_RESULT_UNINITIALIZED;
            switch (r.Outcome)
            {
            case UM_TBM_Outcome.Won:
                result = GP_TBM_ParticipantResult.MATCH_RESULT_WIN;
                break;

            case UM_TBM_Outcome.Lost:
                result = GP_TBM_ParticipantResult.MATCH_RESULT_LOSS;
                break;

            case UM_TBM_Outcome.Tied:
                result = GP_TBM_ParticipantResult.MATCH_RESULT_TIE;
                break;

            case UM_TBM_Outcome.Disconnected:
                result = GP_TBM_ParticipantResult.MATCH_RESULT_DISCONNECT;
                break;

            case UM_TBM_Outcome.None:
                result = GP_TBM_ParticipantResult.MATCH_RESULT_UNINITIALIZED;
                break;
            }

            GP_ParticipantResult res = new GP_ParticipantResult(r.ParticipantId, result, PLACING_UNINITIALIZED);
            resultsList.Add(res);
        }

        GooglePlayTBM.Instance.FinishMatch(matchId, matchData, resultsList.ToArray());
    }
Ejemplo n.º 4
0
 public GP_ParticipantResult(string participantId, GP_TBM_ParticipantResult result, int placing)
 {
     _ParticipantId = participantId;
     _Result        = result;
     _Placing       = placing;
 }
Ejemplo n.º 5
0
	public GP_ParticipantResult(string[] data, int index ) {
		_ParticipantId = data[index];
		_Placing = Convert.ToInt32(data[index + 1]);
		_Result = (GP_TBM_ParticipantResult) Convert.ToInt32(data[index + 2]);
		_VersionCode = Convert.ToInt32(data[index + 3]);
	}
Ejemplo n.º 6
0
	public GP_ParticipantResult(int versionCode, string participantId, GP_TBM_ParticipantResult result, int placing) {
		_ParticipantId = participantId;
		_Result = result;
		_Placing = placing;
		_VersionCode = versionCode;
	}
Ejemplo n.º 7
0
	public GP_ParticipantResult(string participantId, GP_TBM_ParticipantResult result, int placing) {
		_ParticipantId = participantId;
		_Result = result;
		_Placing = placing;
	}