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