protected bool GetTouchInputDown(KeyCode key) { switch (key) { case KeyCode.A: return(leftMoveData.GetKeyDown()); case KeyCode.D: return(rightMoveData.GetKeyDown()); case KeyCode.Space: return(leftJumpData.GetKeyDown() || rightJumpData.GetKeyDown()); case KeyCode.Escape: case KeyCode.Menu: if (Input.GetKeyDown(key)) { print(key.ToString()); } return(Input.GetKeyDown(key)); } return(false); }