Esempio n. 1
0
    public void OnCreateRoom()
    {
        SoundManager.Instance.PlayUIButtonClick();
        PromptWindow window = UIFactory.Instance.Create(UI_ELEMENT.PROMPT_WINDOW).GetComponent <PromptWindow>();

        window.Initialize();
        window.AttachUIElement(new Vector2(0, 50), LobbySceneGUI.Instance.lobbyGUI);
        window.SetTitle("생성 할 방의 이름을 입력하시오.");

        window.AddConfirmEventFunc(() => {
            CLIENTtoSERVER_CreateRoomPacketData data = new CLIENTtoSERVER_CreateRoomPacketData();
            data.playerKey = GameFramework.Instance.MyPlayer.PlayerKey;
            data.roomName  = window.GetInputText();
            NetworkManager.Instance.SendCommand((int)PROTOCOL.CREATE_ROOM, (int)EXTRA.REQUEST, data);
        });
    }