コード例 #1
0
    public void StartChat()
    {
        ChatNewGui chatNewComponent = FindObjectOfType <ChatNewGui>();

        chatNewComponent.UserName = this.idInput.text.Trim();
        chatNewComponent.enabled  = true;
        enabled = false;
        this.AppIdInputPanel.gameObject.SetActive(false);
        this.NameInputPanel.gameObject.SetActive(false);

        PlayerPrefs.SetString(NamePickNewGui.UserNamePlayerPref, chatNewComponent.UserName);
    }
コード例 #2
0
    public void Start()
    {
        this.chatNewComponent = FindObjectOfType<ChatNewGui>();

        bool appIdMissing = string.IsNullOrEmpty(this.chatNewComponent.ChatAppId);
        this.AppIdInputPanel.gameObject.SetActive(appIdMissing);
        this.NameInputPanel.gameObject.SetActive(!appIdMissing);

        string prefsName = PlayerPrefs.GetString(NamePickNewGui.UserNamePlayerPref);
        if (!string.IsNullOrEmpty(prefsName))
        {
            this.idInput.text = prefsName;
        }
    }
コード例 #3
0
    public void Start()
    {
        this.chatNewComponent = FindObjectOfType <ChatNewGui>();

        bool appIdMissing = string.IsNullOrEmpty(this.chatNewComponent.ChatAppId);

        this.AppIdInputPanel.gameObject.SetActive(appIdMissing);
        this.NameInputPanel.gameObject.SetActive(!appIdMissing);

        string prefsName = PlayerPrefs.GetString(NamePickNewGui.UserNamePlayerPref);

        if (!string.IsNullOrEmpty(prefsName))
        {
            this.idInput.text = prefsName;
        }
    }
コード例 #4
0
    public void Start()
    {
        this.guiCenteredRect = new Rect(Screen.width/2-GuiSize.x/2, Screen.height/2-GuiSize.y/2, GuiSize.x, GuiSize.y);
        this.chatNewComponent = this.GetComponent<ChatNewGui>();

        if (this.chatNewComponent != null && this.chatNewComponent.enabled)
        {
            Debug.LogWarning("When using the NamePickGui, ChatNewGui should be disabled initially.");

            if (this.chatNewComponent.chatClient != null)
            {
                this.chatNewComponent.chatClient.Disconnect();
            }
            this.chatNewComponent.enabled = false;
        }

        string prefsName = PlayerPrefs.GetString(NamePickGui.UserNamePlayerPref);
        if (!string.IsNullOrEmpty(prefsName))
        {
            this.InputLine = prefsName;
        }
    }
コード例 #5
0
    public void Start()
    {
        this.guiCenteredRect  = new Rect(Screen.width / 2 - GuiSize.x / 2, Screen.height / 2 - GuiSize.y / 2, GuiSize.x, GuiSize.y);
        this.chatNewComponent = this.GetComponent <ChatNewGui>();

        if (this.chatNewComponent != null && this.chatNewComponent.enabled)
        {
            Debug.LogWarning("When using the NamePickGui, ChatNewGui should be disabled initially.");

            if (this.chatNewComponent.chatClient != null)
            {
                this.chatNewComponent.chatClient.Disconnect();
            }
            this.chatNewComponent.enabled = false;
        }

        string prefsName = PlayerPrefs.GetString(NamePickGui.UserNamePlayerPref);

        if (!string.IsNullOrEmpty(prefsName))
        {
            this.InputLine = prefsName;
        }
    }
コード例 #6
0
ファイル: ChannelSelector.cs プロジェクト: honglux/UnityTests
    public void OnPointerClick(PointerEventData eventData)
    {
        ChatNewGui handler = FindObjectOfType <ChatNewGui>();

        handler.ShowChannel(this.Channel);
    }