If have done the coding chalange like that, was it a problem?
The code:
void Start()
{
}
// Update is called once per frame
void Update()
{
ProcessInputSpace();
ProcessInputA();
ProcessInputD();
}
private void ProcessInputSpace()
{
if(Input.GetKey(KeyCode.Space))
{
print("Space pressed");
}
}
private void ProcessInputA()
{
if (Input.GetKey(KeyCode.A))
{
print("A pressed");
}
}
private void ProcessInputD()
{
if (Input.GetKey(KeyCode.D))
{
print("D pressed");
}
}