public void hostGame() { GameObject menuSetup = GameObject.FindGameObjectWithTag("ScriptObject"); MenuSetup menuScript = (MenuSetup)menuSetup.GetComponent(typeof(MenuSetup)); GameObject network = menuScript.networkObject; Networking networkScript = (Networking)network.GetComponent(typeof(Networking)); CreateItems items = (CreateItems)menuSetup.GetComponent(typeof(CreateItems)); string name = items.nameField.text; byte players = (byte)(8); int passworded = items.Passworded.value; string password = items.Password.text; // Check values if (name == "" || name.Length > 32) { // No! Debug.Log("Name"); } else if (players < 2 || players > 16) { // No! Debug.Log("Players"); } else if (passworded < 0 || passworded > 1) { // No! Debug.Log("Passworded"); } else if (password == "" && passworded == 1) { // No! Debug.Log("Password"); } else { // Name, Players, Server List, Passworded, Password networkScript.HostGame(name, players, true, passworded, password); } }
public void Create(Personal personal) { CreateItems?.Invoke(personal); }
public void Create(Deposit deposit) { CreateItems?.Invoke(deposit); }
public void Create(MessagesLog log) { CreateItems?.Invoke(log); }
public void Create(Credits credits) { CreateItems?.Invoke(credits); }
public void Create(OperationHistory history) { history.OperationDate = DateTime.Now; CreateItems?.Invoke(history); }