KeyBoardInterface.cs 552 B

12345678910111213141516171819202122
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class KeyBoardInterface : MonoBehaviour
  5. {
  6. void Update()
  7. {
  8. if (Input.GetKeyDown(KeyCode.LeftArrow))
  9. {
  10. KeyBoardSelector.ins.HandleInput(-1);
  11. }
  12. if (Input.GetKeyDown(KeyCode.RightArrow))
  13. {
  14. KeyBoardSelector.ins.HandleInput(+1);
  15. }
  16. if (Input.GetKeyDown(KeyCode.Return) || Input.GetKeyDown(KeyCode.KeypadEnter))
  17. {
  18. KeyBoardSelector.ins.Enter();
  19. }
  20. }
  21. }