This is a classic case. You can make the global dependent variables in a config (or some container class) which implements an interface. Now in the live example implement your interface with a config reader class and your methods should read these values from the interface only.
You can create a property (or setter method) so that you can inject a test implementation
Now while testing you can create a test implementation and set the property with the implementation and then your methods should work the same way.
Here is some example code:
public interface IPlayer
{
string Name { get; }
}
public class Player : IPlayer
{
private InputManager inputManager;
public Player(string name)
{
Name = name;
}
}
let me know if you need more code to understand