// Start is called before the first frame update void Start() { // assign RoomSystem object roomPalette = GameObject.FindGameObjectWithTag("Rooms").GetComponent <RoomSystem>(); // Invoke function on a delay to make sure spawning occurs properly Invoke("SpawnRoom", 0.1f); }
public override void OnEnter(GameStateContext context) { room = RoomSystem.Create(context.UserName); SceneManager.LoadScene("Lobby"); EventSystem.AddListener(EventID.HandShake, OnHandShake); }
public static RoomSystem Create(string userName) { if (instance != null) { Debug.LogError("RoomSystem Exist!"); return(instance); } instance = new RoomSystem(); instance.userName = userName; return(instance); }
static public int constructor(IntPtr l) { try { RoomSystem o; o = new RoomSystem(); pushValue(l, true); pushValue(l, o); return(2); } catch (Exception e) { return(error(l, e)); } }
private void OnPlayerConnected(object sender, ClientConnectedEventArgs e) { // If you have DR2 Pro, use the Plugin.Loaded() method instead if (_loginPlugin == null) { _loginPlugin = PluginManager.GetPluginByType <Login>(); _roomSystem = PluginManager.GetPluginByType <RoomSystem>(); _loginPlugin.onLogout += RemovePlayerFromChatGroups; ChatGroups["General"] = new ChatGroup("General"); } e.Client.MessageReceived += OnMessageReceived; }
static public int SearchRoom(IntPtr l) { try { RoomSystem self = (RoomSystem)checkSelf(l); System.Int32 a1; checkType(l, 2, out a1); var ret = self.SearchRoom(a1); pushValue(l, true); pushValue(l, ret); return(2); } catch (Exception e) { return(error(l, e)); } }
static public int GetRoomCount(IntPtr l) { try { RoomSystem self = (RoomSystem)checkSelf(l); System.Byte a1; checkType(l, 2, out a1); var ret = self.GetRoomCount(a1); pushValue(l, true); pushValue(l, ret); return(2); } catch (Exception e) { return(error(l, e)); } }
private void Awake() { instance = this; }
private void Awake(){ instance = this; }
public void Destroy() { instance = null; }