i have seen the following code in an c# example:
public void AddScreen(GameScreen screen, PlayerIndex? controllingPlayer)
{
screen.ControllingPlayer = controllingPlayer;
screen.ScreenManager = this;
screen.IsExiting = false;
}
and i have no clue what the ?
is doing after PlayerIndex, it is an enum, and in the class every notice of it is with the ?
behind it.
my question: what does it do, what is it called and why would you use it.
I have googled this, but it didn't get me far since i dont know the name of this coding and google filters out the question mark in the search query