Exemplo n.º 1
0
    void Start()
    {
        GameObject lobbyCanvasObj = MainCanvasManager.instance.lobbyCanvas.gameObject;

        if (lobbyCanvasObj == null)
        {
            return;
        }
        LobbyCanvas lobbyCanvas = lobbyCanvasObj.GetComponent <LobbyCanvas>();
        Button      button      = GetComponent <Button>();

        button.onClick.AddListener(() => lobbyCanvas.OnClickJoinRoom(roomNameText.text));
    }
Exemplo n.º 2
0
    // Use this for initialization
    private void Start()
    {
        //get the LobbyCanvas GameObject in Main Canvas
        GameObject lobbyCanvasObj = MainCanvasManager.Instance.lobbyCanvas.gameObject;

        if (lobbyCanvasObj == null)
        {
            return;
        }
        //get the lobbyCanvas srcipt in lobbyCanvas Object
        LobbyCanvas lobbyCanvas = lobbyCanvasObj.GetComponent <LobbyCanvas> ();
        //Add button listener and call the LobbyCanvas.OnClickJoinRoom function by pressed the button
        Button button = GetComponent <Button> ();

        button.onClick.AddListener(() => lobbyCanvas.OnClickJoinRoom(RoomName));
    }
Exemplo n.º 3
0
    // set up a listener
    private void Start()
    {
        GameObject lobbyCanvasObj = MainCanvasManager.Instance.LobbyCanvas.gameObject;

        //This shouldn't happen but if it does then we have a check
        if (lobbyCanvasObj == null)
        {
            return;
        }

        LobbyCanvas lobbyCanvas = lobbyCanvasObj.GetComponent <LobbyCanvas> ();


        Button button = GetComponent <Button> ();

        button.onClick.AddListener(() => lobbyCanvas.OnClickJoinRoom(RoomNameText.text));
    }
Exemplo n.º 4
0
    private void Start()
    {
        //Getting the Lobby Canvas object

        GameObject LobbyCanvasObj = MainMPCanvasManager.Instance.LobbyCanvas.gameObject;

        if (LobbyCanvasObj == null)
        {
            return;
        }

        LobbyCanvas lobbyCanvas = LobbyCanvasObj.GetComponent <LobbyCanvas>();

        //Get the Room Name text
        Button button = GetComponent <Button>();

        button.onClick.AddListener(() => lobbyCanvas.OnClickJoinRoom(RoomNameText.text));
    }
Exemplo n.º 5
0
    // Start is called before the first frame update
    private void Start()
    {
        GameObject LobbyCanvasObject = MainCanvasManager.Instance.LobbyCanvas.gameObject;

        if (LobbyCanvasObject == null)
        {
            return;
        }

        LobbyCanvas lobbyCanvas = LobbyCanvasObject.GetComponent <LobbyCanvas>();

        Button button = GetComponent <Button>();

        if (button == null)
        {
            print("button is null");
        }
        button.onClick.AddListener(() => lobbyCanvas.OnClickJoinRoom(RoomNameText.text));
    }
Exemplo n.º 6
0
 void OnDoubleClick()
 {
     lobbyCanvas.OnClickJoinRoom(RoomNameText.text);
     blockRaycastRoom.SetActive(true);
 }