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