예제 #1
0
 private void Start()
 {
     rectTransform     = base.transform as RectTransform;
     root              = GetComponentInParent <Canvas>().transform;
     chatBarController = root.GetComponentInChildren <ChatBarController>();
     if (chatBarController != null)
     {
         updateState(chatBarController.CurrentState);
     }
     Service.Get <EventDispatcher>().AddListener <ChatBarEvents.ChatBarStateChanged>(onChatBarStateChanged, EventDispatcher.Priority.HIGH);
 }
예제 #2
0
 private void updateState(ChatBarState chatBarState)
 {
     if (chatBarController == null)
     {
         chatBarController = root.GetComponentInChildren <ChatBarController>();
     }
     if (chatBarState == ChatBarState.EmoteInput)
     {
         rectTransform.anchoredPosition = new Vector2(rectTransform.anchoredPosition.x, InputPosition);
     }
     else
     {
         rectTransform.anchoredPosition = new Vector2(rectTransform.anchoredPosition.x, InstantPosition);
     }
 }