/// <summary>
 /// This function will ascoaciate a Game State Instance with a name.
 /// To reload a game state, call this function with a new instance of the GameState
 /// </summary>
 /// <param name="name">string to ascoaciate with the state</param>
 /// <param name="state">an instance of a game state object</param>
 public static void SetState(string name, IGameState state)
 {
     m_gameStates[name] = state;
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="state">the game state instance to check if is on top of the game state stack</param>
 /// <returns>True if the state is on top of the stack</returns>
 public static bool IsStateOnTop(IGameState state)
 {
     if (m_stateStack.Count == 0) return false;
     return m_stateStack[ m_stateStack.Count - 1 ] == state;
 }