1
Fork 0
mirror of https://github.com/Steffo99/better-tee.git synced 2024-11-26 16:54:17 +00:00
better-tee/Assets/Packages/Mirror/Examples/Lobby/Scripts/OfflineGUI.cs

31 lines
778 B
C#
Raw Normal View History

2019-09-15 22:28:36 +00:00
using UnityEngine;
using UnityEngine.SceneManagement;
namespace Mirror.Examples.NetworkLobby
{
public class OfflineGUI : MonoBehaviour
{
[Scene]
public string LobbyScene;
void Start()
{
// Ensure main camera is enabled because it will be disabled by PlayerController
Camera.main.enabled = true;
}
void OnGUI()
{
GUILayout.BeginArea(new Rect(10, 10, 200, 130));
GUILayout.Box("OFFLINE SCENE");
GUILayout.Box("WASDQE keys to move & turn\nTouch the spheres for points\nLighter colors score higher");
if (GUILayout.Button("Join Game"))
SceneManager.LoadScene(LobbyScene);
GUILayout.EndArea();
}
}
}