From e7160e709c7240c80a9c2c22d87448c668e6946b Mon Sep 17 00:00:00 2001
From: _nebula <41904486+misternebula@users.noreply.github.com>
Date: Wed, 2 Aug 2023 11:36:30 +0100
Subject: [PATCH] Update IQSBAPI.cs
---
APITestMod/IQSBAPI.cs | 30 ++++++++++++++++++++++++++++--
1 file changed, 28 insertions(+), 2 deletions(-)
diff --git a/APITestMod/IQSBAPI.cs b/APITestMod/IQSBAPI.cs
index 651f1f50..4f396d86 100644
--- a/APITestMod/IQSBAPI.cs
+++ b/APITestMod/IQSBAPI.cs
@@ -32,19 +32,43 @@ public interface IQSBAPI
///
/// Returns the list of IDs of all connected players.
+ ///
+ /// The first player in the list is the host.
///
uint[] GetPlayerIDs();
///
- /// Invoked when a player joins the game.
+ /// Invoked when any player (local or remote) joins the game.
///
UnityEvent OnPlayerJoin();
///
- /// Invoked when a player leaves the game.
+ /// Invoked when any player (local or remote) leaves the game.
///
UnityEvent OnPlayerLeave();
+ ///
+ /// Invoked when the local client joins a game,
+ /// either through connecting to an external game or hosting their own game.
+ ///
+ UnityEvent OnLocalJoin();
+
+ ///
+ /// Invoked when a client (but not the local player) joins the game.
+ ///
+ UnityEvent OnPeerJoin();
+
+ ///
+ /// Invoked when the local client leaves a game,
+ /// either through disconnecting from an external game or shutting down the hosted server.
+ ///
+ UnityEvent OnLocalLeave();
+
+ ///
+ /// Invoked when a client (but not the local player) leaves the game.
+ ///
+ UnityEvent OnPeerLeave();
+
///
/// Sets some arbitrary data for a given player.
///
@@ -65,6 +89,8 @@ public interface IQSBAPI
///
/// Sends a message containing arbitrary data to every player.
+ ///
+ /// Keep your messages under around 1100 bytes.
///
/// The type of the data being sent. This type must be serializable.
/// The unique key of the message.