Skip to content

Instantly share code, notes, and snippets.

@kinifi
Created March 26, 2016 19:15
Show Gist options
  • Save kinifi/5f852e05d428c5a26f81 to your computer and use it in GitHub Desktop.
Save kinifi/5f852e05d428c5a26f81 to your computer and use it in GitHub Desktop.
public bool getBool(string key)
{
//make the key not case sensitive
key = lowerCaseValue(key);
//check if the key exists
if (m_GameData.ContainsKey(key))
{
bool returnedBool = (bool)m_GameData[key];
//return the string
return returnedBool;
}
else
{
//HELP HERE
//if the key doesn't exist I need to do something here but not stop the game
//what is the appropriate way of doing this?
//throw new Exception("Key Does not exist");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment