private void Awake() { Debug.Log("Loaded Lobby"); // Ensure only one of this class exists if (m_Instance != null) { Destroy(m_Instance); } m_Instance = this; m_LobbyPlayers = new Dictionary <NetworkingPlayer, LobbyPlayer>(); if (NetworkManager.Instance == null) { return; } if (NetworkManager.Instance.IsServer) { NetworkManager.Instance.InstantiateAether(); NetworkManager.Instance.Networker.playerDisconnected += OnPlayerDisconnected; } NetworkManager.Instance.Networker.disconnected += OnDisconnected; }
// SerialPort sp; // Use this for initialization void Start() { playerList = GameObject.FindGameObjectsWithTag("Player"); sp = SerialPortUnity.Instance; ls = GameObject.Find("MasterLevelController").GetComponent <LobbySystem>(); allDone = false; //serialController = GameObject.Find("SerialController").GetComponent<SerialController>(); //serialListener = GameObject.Find("SerialListener").GetComponent<SerialListener>(); }
static public int constructor(IntPtr l) { try { LobbySystem o; o = new LobbySystem(); pushValue(l, true); pushValue(l, o); return(2); } catch (Exception e) { return(error(l, e)); } }
static public int GetAllPlayerInfo(IntPtr l) { try { LobbySystem self = (LobbySystem)checkSelf(l); var ret = self.GetAllPlayerInfo(); pushValue(l, true); pushValue(l, ret); return(2); } catch (Exception e) { return(error(l, e)); } }
// Use this for initialization void Start() { ls = GameObject.Find("MasterLevelController").GetComponent <LobbySystem>(); bool[] Array = ls.GetArrayOfPlayerActive(); for (int i = 0; i < Array.Length; i++) { if (Array[i]) { string CameraName = "Camera_" + (i + 1); GameObject.Find(CameraName).SetActive(false); } } }
static public int GetPlayerInfo(IntPtr l) { try { LobbySystem self = (LobbySystem)checkSelf(l); System.UInt64 a1; checkType(l, 2, out a1); var ret = self.GetPlayerInfo(a1); pushValue(l, true); pushValue(l, ret); return(2); } catch (Exception e) { return(error(l, e)); } }
private void OnApplicationQuit() { m_Instance = null; }