Added basic lobby
This commit is contained in:
@@ -10,6 +10,8 @@ public class MainMenuController : MonoBehaviour
|
||||
[SerializeField] private Button JoinButton;
|
||||
[SerializeField] private InputField HostCode;
|
||||
[SerializeField] private Dropdown HostNetworkType;
|
||||
[SerializeField] private InputField PlayerName;
|
||||
[SerializeField] private Slider PlayerCount;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
@@ -35,5 +37,15 @@ public class MainMenuController : MonoBehaviour
|
||||
|
||||
Network.Join(code);
|
||||
});
|
||||
|
||||
PlayerCount.onValueChanged.AddListener(value =>
|
||||
{
|
||||
GameNetworkClient.LocalClientCount = Mathf.RoundToInt(value);
|
||||
});
|
||||
|
||||
PlayerName.onEndEdit.AddListener(value =>
|
||||
{
|
||||
GameNetworkClient.LocalName = value;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user