예제 #1
0
 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)));
        }
예제 #3
0
        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)));
        }
예제 #4
0
        internal MultiplayerParticipant PendingParticipant()
        {
            var participant = new MultiplayerParticipant(
                C.TurnBasedMatch_PendingParticipant(SelfPtr()));

            if (!participant.Valid())
            {
                participant.Dispose();
                return(null);
            }

            return(participant);
        }
예제 #5
0
        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)));
        }
예제 #6
0
 internal ParticipantResults Results()
 {
     return(new ParticipantResults(C.TurnBasedMatch_ParticipantResults(SelfPtr())));
 }
예제 #7
0
 internal uint Variant()
 {
     return(C.TurnBasedMatch_Variant(SelfPtr()));
 }
예제 #8
0
 internal uint Version()
 {
     return(C.TurnBasedMatch_Version(SelfPtr()));
 }
예제 #9
0
 internal ulong CreationTime()
 {
     return(C.TurnBasedMatch_CreationTime(SelfPtr()));
 }
예제 #10
0
 internal uint AvailableAutomatchSlots()
 {
     return(C.TurnBasedMatch_AutomatchingSlotsAvailable(SelfPtr()));
 }
예제 #11
0
 protected override void CallDispose(HandleRef selfPointer)
 {
     C.TurnBasedMatch_Dispose(selfPointer);
 }
예제 #12
0
 internal string Id()
 {
     return(PInvokeUtilities.OutParamsToString(
                (out_string, size) => C.TurnBasedMatch_Id(SelfPtr(), out_string, size)));
 }
예제 #13
0
 internal Types.MatchStatus MatchStatus()
 {
     return(C.TurnBasedMatch_Status(SelfPtr()));
 }
 internal bool HasRematchId()
 {
     return(C.TurnBasedMatch_HasRematchId(SelfPtr()));
 }