38 lines
783 B
C#
38 lines
783 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using MLAPI;
|
|
|
|
public class Menu : MonoBehaviour
|
|
{
|
|
public GameObject menuPanel;
|
|
public GameObject menuCamera;
|
|
|
|
public GameObject spawnPoint;
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
public void Host()
|
|
{
|
|
menuPanel.SetActive(false);
|
|
menuCamera.SetActive(false);
|
|
NetworkManager.Singleton.StartHost(spawnPoint.transform.position);
|
|
}
|
|
|
|
public void Join()
|
|
{
|
|
menuPanel.SetActive(false);
|
|
menuCamera.SetActive(false);
|
|
NetworkManager.Singleton.StartClient();
|
|
}
|
|
}
|