// Update is called once per frame void Update() { _optionNode = ChatManager.Instance.TryGetOptionNode(); if (_optionNode == null || _optionNode.option == -2) { Show(0); return; } Show(_optionNode.labels.Count); }
// Update is called once per frame void Update() { if (isShow) { if (count != 1.0f) { count = Mathf.Lerp(count, 1.1f, 8.0f * Time.deltaTime); if (count >= 1.0f) { count = 1.0f; } } } else { if (count != 0.0f) { count = Mathf.Lerp(count, -0.1f, 8.0f * Time.deltaTime); if (count <= 0.0f) { count = 0.0f; } } } RefreshLayoutByCount(); _optionNode = ChatManager.Instance.TryGetOptionNode(); if (_optionNode == null || _optionNode.option == -2) { Show(0); hasOption = false; sendButton.interactable = false; return; } Show(_optionNode.labels.Count); sendButton.interactable = (index != -1); if (!hasOption) { if (_optionNode != null && !isShow) { Show(); } } hasOption = true; }