internal IEnumerable <MultiplayerParticipant> Participants() { return(PInvokeUtilities.ToEnumerable( C.TurnBasedMatch_Participants_Length(SelfPtr()), (index) => new MultiplayerParticipant( C.TurnBasedMatch_Participants_GetElement(SelfPtr(), index)))); }
internal string RematchId() { if (!HasRematchId()) { return(null); } return(PInvokeUtilities.OutParamsToString( (out_string, size) => C.TurnBasedMatch_RematchId(SelfPtr(), out_string, size))); }
internal byte[] Data() { if (!C.TurnBasedMatch_HasData(SelfPtr())) { Logger.d("Match has no data."); return(null); } return(PInvokeUtilities.OutParamsToArray <byte>( (bytes, size) => C.TurnBasedMatch_Data(SelfPtr(), bytes, size))); }
internal MultiplayerParticipant PendingParticipant() { var participant = new MultiplayerParticipant( C.TurnBasedMatch_PendingParticipant(SelfPtr())); if (!participant.Valid()) { participant.Dispose(); return(null); } return(participant); }
internal string RematchId() { // There is a bug in C++ for android that always returns true for // HasRematchId - so commenting out this optimization until it is // fixed. //if (!HasRematchId()) //{ // Logger.d("Returning NUll for rematch id since it does not have one"); // return null; //} return(PInvokeUtilities.OutParamsToString( (out_string, size) => C.TurnBasedMatch_RematchId(SelfPtr(), out_string, size))); }
internal ParticipantResults Results() { return(new ParticipantResults(C.TurnBasedMatch_ParticipantResults(SelfPtr()))); }
internal uint Variant() { return(C.TurnBasedMatch_Variant(SelfPtr())); }
internal uint Version() { return(C.TurnBasedMatch_Version(SelfPtr())); }
internal ulong CreationTime() { return(C.TurnBasedMatch_CreationTime(SelfPtr())); }
internal uint AvailableAutomatchSlots() { return(C.TurnBasedMatch_AutomatchingSlotsAvailable(SelfPtr())); }
protected override void CallDispose(HandleRef selfPointer) { C.TurnBasedMatch_Dispose(selfPointer); }
internal string Id() { return(PInvokeUtilities.OutParamsToString( (out_string, size) => C.TurnBasedMatch_Id(SelfPtr(), out_string, size))); }
internal Types.MatchStatus MatchStatus() { return(C.TurnBasedMatch_Status(SelfPtr())); }
internal bool HasRematchId() { return(C.TurnBasedMatch_HasRematchId(SelfPtr())); }