mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-10 03:40:01 +00:00
remove Host events
This commit is contained in:
parent
b45e38556c
commit
e0aeb00c7b
@ -21,16 +21,6 @@ public interface IQSBAPI
|
||||
/// </summary>
|
||||
bool GetIsInMultiplayer();
|
||||
|
||||
/// <summary>
|
||||
/// Invoked on the host when the server is first started.
|
||||
/// </summary>
|
||||
UnityEvent OnStartHost();
|
||||
|
||||
/// <summary>
|
||||
/// Invoked on the host when the server is closed.
|
||||
/// </summary>
|
||||
UnityEvent OnStopHost();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Player
|
||||
|
@ -21,16 +21,6 @@ public interface IQSBAPI
|
||||
/// </summary>
|
||||
bool GetIsInMultiplayer();
|
||||
|
||||
/// <summary>
|
||||
/// Invoked on the host when the server is first started.
|
||||
/// </summary>
|
||||
UnityEvent OnStartHost();
|
||||
|
||||
/// <summary>
|
||||
/// Invoked on the host when the server is closed.
|
||||
/// </summary>
|
||||
UnityEvent OnStopHost();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Player
|
||||
|
@ -19,9 +19,6 @@ public class QSBAPI : IQSBAPI
|
||||
public bool GetIsHost() => QSBCore.IsHost;
|
||||
public bool GetIsInMultiplayer() => QSBCore.IsInMultiplayer;
|
||||
|
||||
public UnityEvent OnStartHost() => QSBAPIEvents.OnStartHostEvent;
|
||||
public UnityEvent OnStopHost() => QSBAPIEvents.OnStopHostEvent;
|
||||
|
||||
public uint GetLocalPlayerID() => QSBPlayerManager.LocalPlayerId;
|
||||
public string GetPlayerName(uint playerId) => QSBPlayerManager.GetPlayer(playerId).Name;
|
||||
public uint[] GetPlayerIDs() => QSBPlayerManager.PlayerList.Select(x => x.PlayerId).ToArray();
|
||||
@ -51,7 +48,4 @@ internal static class QSBAPIEvents
|
||||
|
||||
internal static readonly PlayerEvent OnPlayerJoinEvent = new();
|
||||
internal static readonly PlayerEvent OnPlayerLeaveEvent = new();
|
||||
|
||||
internal static readonly UnityEvent OnStartHostEvent = new();
|
||||
internal static readonly UnityEvent OnStopHostEvent = new();
|
||||
}
|
||||
|
@ -403,15 +403,8 @@ public class QSBNetworkManager : NetworkManager, IAddComponentOnStart
|
||||
base.OnServerDisconnect(conn);
|
||||
}
|
||||
|
||||
public override void OnStartServer()
|
||||
{
|
||||
QSBAPIEvents.OnStartHostEvent.Invoke();
|
||||
base.OnStartServer();
|
||||
}
|
||||
|
||||
public override void OnStopServer()
|
||||
{
|
||||
QSBAPIEvents.OnStopHostEvent.Invoke();
|
||||
DebugLog.DebugWrite("OnStopServer", MessageType.Info);
|
||||
Destroy(GetComponent<RespawnOnDeath>());
|
||||
DebugLog.ToConsole("Server stopped!", MessageType.Info);
|
||||
|
Loading…
x
Reference in New Issue
Block a user