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();
                }
            }
        }
Exemplo n.º 2
0
 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();
     }
 }