Initial Commit
This commit is contained in:
parent
53eb92e9af
commit
270ab7d11f
15341 changed files with 700234 additions and 0 deletions
38
Assets/Scripts/Menu.cs
Normal file
38
Assets/Scripts/Menu.cs
Normal file
|
@ -0,0 +1,38 @@
|
|||
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();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue