123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- 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 ();
- }
- }
|