Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. private void Update()
  2. {
  3. if (Input.GetKeyDown(KeyCode.Return))
  4. {
  5. CanMove = !CanMove;
  6.  
  7. if (!CanMove)
  8. {
  9. EventSystem.current.SetSelectedGameObject(chatInputField.gameObject);
  10. }
  11. else
  12. {
  13. Debug.Log("Test");
  14. if (chatInputField.text != "")
  15. {
  16. myChatManager.SendChatMessage(chatInputField.text, myPlayer.CharacterName);
  17. AddMessage(chatInputField.text, myPlayer.CharacterName);
  18. chatInputField.text = "";
  19. }
  20.  
  21. if (Input.GetKeyDown(KeyCode.Return))
  22. {
  23. EventSystem.current.SetSelectedGameObject(myPlayer.gameObject);
  24. }
  25. }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement