refactor: wip
This commit is contained in:
parent
4b61948f68
commit
0cb7131435
5 changed files with 69 additions and 45 deletions
17
Addons/GBSUClient.cs
Normal file
17
Addons/GBSUClient.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
using GB.Core;
|
||||
using GB.Platform.Lobby;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GBSU.Addons;
|
||||
|
||||
public class GBSUClient : MonoBehaviour
|
||||
{
|
||||
public static void JoinServer(string serverip, int serverport)
|
||||
{
|
||||
LobbyManager.Instance.LobbyStates.IP = serverip;
|
||||
LobbyManager.Instance.LobbyStates.Port = serverport;
|
||||
LobbyManager.Instance.LobbyStates.CurrentState = LobbyState.State.Ready | LobbyState.State.InGame;
|
||||
LobbyManager.Instance.LocalBeasts.SetupNetMemberContext(true);
|
||||
MonoSingleton<Global>.Instance.UNetManager.LaunchClient(serverip, serverport);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue