using UnityEngine; using UnityEngine.UI; using System.Collections; using System.Collections.Generic; public class ChatBar : MonoBehaviour { public Animator animator; public NavTab navTab; public ChatBarGlobalView globalView; public ChatBarChatView chatView; private bool m_isShown; public bool isShown { get{ return m_isShown;} } void Awake() { if(!isShown) this.gameObject.SetActive (false); navTab.SetTitles (new string[]{Language.GetStr("ChatPanel", "global"), Language.GetStr("ChatPanel", "chat")}); } void OnDestroy() { } public void Show() { m_isShown = true; if (!this.gameObject.activeSelf) this.gameObject.SetActive (true); animator.Play ("ChatBarShow"); } public void ShowComplete() { SyncManager.Sync (SyncManager.SyncType.Chat, 10f); } public void Hide() { m_isShown = false; animator.Play ("ChatBarHide"); ChatPanel.Hide (); } }