public void HandleInput() { FocusableObject currentFocusableObject = FocusableObject.CurrentObject; if (Input.GetButtonDown("Submit")) { Debug.Log("Submit"); currentFocusableObject.OnSubmit(); } if (Input.GetButtonDown("Cancel")) { Debug.Log("Cancel"); currentFocusableObject.OnCancel(); } if (Input.GetButtonDown("Fire3")) { Debug.Log("Fire3"); currentFocusableObject.OnInformation(); } float horizontal = Input.GetAxis("Horizontal"); float vertical = Input.GetAxis("Vertical"); if (horizontal != 0f || vertical != 0f) { Debug.Log("Arrow"); FocusableObject.CurrentObject.OnArrow(horizontal, vertical); System.Threading.Thread.Sleep(50); } }
public IEnumerator Information(FocusableObject focusableObject) { focusableObject.OnInformation(); yield return(null); }