private void CheckInput() { if (Input.GetKeyDown(KeyCode.LeftArrow)) // checking for input of specific key { OnLeftPressed.Invoke(MoveSide.Left); } if (Input.GetKeyDown(KeyCode.RightArrow)) { OnRightPressed.Invoke(MoveSide.Right); } if (Input.GetKeyDown(KeyCode.UpArrow)) { OnUpPressed.Invoke(); } if (Input.GetKeyDown(KeyCode.DownArrow)) { OnDownPressed.Invoke(); } }
private void NotifyDownPressed() { OnDownPressed?.Invoke(); SayToLog("Down pressed."); }