예제 #1
0
            private static void AssignSyncDelegateFunctions()
            {
                Debug.Log("Assign Sync Delegate Functions");

                var    onMatchCompletedFP = new VoidFP(onMatchCompleted);
                IntPtr onMatchCompletedIP = Marshal.GetFunctionPointerForDelegate(onMatchCompletedFP);

                InteropMethods._assignOnMatchCompletedFunc(onMatchCompletedIP);

                var    onDidReceiveDataFP = new IntPtrIntFP(onDidReceiveData);
                IntPtr onDidReceiveDataIP = Marshal.GetFunctionPointerForDelegate(onDidReceiveDataFP);

                InteropMethods._assignOnDidReceiveDataFunc(onDidReceiveDataIP);

                var    onOpponentHasLostConnectionFP = new IntFP(onOpponentHasLostConnection);
                IntPtr onOpponentHasLostConnectionIP = Marshal.GetFunctionPointerForDelegate(onOpponentHasLostConnectionFP);

                InteropMethods._assignOnOpponentHasLostConnectionFunc(onOpponentHasLostConnectionIP);

                var    OnOpponentHasReconnectedFP = new IntFP(onOpponentHasReconnected);
                IntPtr onOpponentHasReconnectedIP = Marshal.GetFunctionPointerForDelegate(OnOpponentHasReconnectedFP);

                InteropMethods._assignOnOpponentHasReconnectedFunc(onOpponentHasReconnectedIP);

                var    onOpponentHasLeftMatchFP = new IntFP(onOpponentHasLeftMatch);
                IntPtr onOpponentHasLeftMatchIP = Marshal.GetFunctionPointerForDelegate(onOpponentHasLeftMatchFP);

                InteropMethods._assignOnOpponentHasLeftMatchFunc(onOpponentHasLeftMatchIP);

                var    onCurrentPlayerHasLostConnectionFP = new VoidFP(onCurrentPlayerHasLostConnection);
                IntPtr onCurrentPlayerHasLostConnectionIP = Marshal.GetFunctionPointerForDelegate(onCurrentPlayerHasLostConnectionFP);

                InteropMethods._assignOnCurrentPlayerHasLostConnectionFunc(onCurrentPlayerHasLostConnectionIP);

                var    onCurrentPlayerHasReconnectedFP = new VoidFP(onCurrentPlayerHasReconnected);
                IntPtr onCurrentPlayerHasReconnectedIP = Marshal.GetFunctionPointerForDelegate(onCurrentPlayerHasReconnectedFP);

                InteropMethods._assignOnCurrentPlayerHasReconnectedFunc(onCurrentPlayerHasReconnectedIP);

                var    onCurrentPlayerHasLeftMatchFP = new VoidFP(onCurrentPlayerHasLeftMatch);
                IntPtr onCurrentPlayerHasLeftMatchIP = Marshal.GetFunctionPointerForDelegate(onCurrentPlayerHasLeftMatchFP);

                InteropMethods._assignOnCurrentPlayerHasLeftMatchFunc(onCurrentPlayerHasLeftMatchIP);
            }
예제 #2
0
 public void LaunchSkillz()
 {
     InteropMethods._launchSkillz();
 }
예제 #3
0
 long ISyncAPI.GetTimeLeftForReconnection(ulong playerId)
 {
     return(InteropMethods._reconnectTimeLeftForPlayer(playerId));
 }
예제 #4
0
 ulong ISyncAPI.GetCurrentPlayerId()
 {
     return(InteropMethods._currentPlayerId());
 }
예제 #5
0
 double ISyncAPI.GetServerTime()
 {
     return(InteropMethods._getServerTime());
 }
예제 #6
0
 public void SetSkillzBackgroundMusic(string fileName)
 {
     Debug.Log("SkillzAudio Api.cs setSkillzBackgroundMusic with file name: " + fileName);
     InteropMethods._setSkillzBackgroundMusic(fileName);
 }
예제 #7
0
 int ISyncAPI.GetConnectedPlayerCount()
 {
     return(InteropMethods._connectedPlayerCount());
 }
예제 #8
0
 public string SDKVersionShort()
 {
     return(Marshal.PtrToStringAnsi(InteropMethods._SDKShortVersion()));
 }
예제 #9
0
 public void AddMetadataForMatchInProgress(string metadataJson, bool forMatchInProgress)
 {
     InteropMethods._addMetadataForMatchInProgress(metadataJson, forMatchInProgress);
 }
예제 #10
0
 public void ReportFinalScore(float score)
 {
     InteropMethods._displayTournamentResultsWithFloatScore(score);
     _matchInfo = null;
 }
예제 #11
0
 public void ReportFinalScore(string score)
 {
     InteropMethods._displayTournamentResultsWithStringScore(score);
     _matchInfo = null;
 }
예제 #12
0
 public void UpdatePlayersCurrentScore(float score)
 {
     InteropMethods._updatePlayersCurrentScore(score);
 }
예제 #13
0
 public void UpdatePlayersCurrentScore(string score)
 {
     InteropMethods._updatePlayersCurrentStringScore(score);
 }
예제 #14
0
 public void AbortMatch()
 {
     InteropMethods._notifyPlayerAbortWithCompletion();
     _matchInfo = null;
 }