private void UpdateChatControls()
        {
            if (ChatPanelController.ChatModeActive)
            {
                if (Input.GetKeyDown(SimulationSettings.SubmitChatKey))
                {
                    var message = ChatPanelController.SubmitChat();
                    if (message.Length > 0)
                    {
                        var chatBehaviour = GetComponent <SendChatBehaviour>();
                        chatBehaviour.SayChat(message);
                    }
                }

                if (Input.GetKeyDown(KeyCode.UpArrow))
                {
                    ChatPanelController.ReuseLastMessage();
                }
                if (Input.GetKeyDown(SimulationSettings.AbortKey))
                {
                    DeactivateChat();
                }
            }
            else
            {
                if (Input.GetKeyDown(SimulationSettings.SubmitChatKey))
                {
                    ActivateChat();
                }
            }
        }
 private void UpdateChatControls()
 {
     //Todo: Handle enabling and disabling ChatMode here!
     if (Input.GetKeyDown(KeyCode.UpArrow) && ChatPanelController.ChatModeActive)
     {
         ChatPanelController.ReuseLastMessage();
     }
     if (Input.GetKeyDown(SimulationSettings.AbortKey) && ChatPanelController.ChatModeActive)
     {
         DeactivateChat();
     }
 }
Example #3
0
    private void Awake()
    {
        if (_Instance == null)
        {
            _Instance = this;
        }

        if (!_isInitial)
        {
            Initial();
        }
        if (_bgTra != null)
        {
            UniversalTool.ReadyUIAnimTwo(GetComponent <CanvasGroup>(), _bgTra);
        }
    }
 public void DeactivateChat()
 {
     ChatPanelController.DeactivateChatMode();
 }
 public void ActivateChat()
 {
     ChatPanelController.ActivateChatMode();
     spellsBehaviour.DeactivateSpellCastingMode();
 }