Trick? Stop precedence

i just use addition Key in my if statements which serves no purpose whatsoever and can never be used in game. Idk if smart or dumb but here it is …

 private static void ProcessInput()
    {

        if(Input.GetKey(KeyCode.Dollar))
        {

        }
       else if (Input.GetKey(KeyCode.LeftArrow))
        {    
            print("moving left");
               
        }
        else if (Input.GetKey(KeyCode.RightArrow))
        {
           
            print("moving right");
        }
        if (Input.GetKey(KeyCode.Space))
            print("Thrust");
    }

Privacy & Terms