} public void AddState(GameState a_gs) { a_gs.IsExiting = false; a_gs.LoadContent (); GameStates.Add (a_gs); //foreach (var i in GameStates) // Console.WriteLine (string.Format ("gs - {0}", i.ID)); //Console.WriteLine("---------------");
} public void RemoveState(GameState a_gs) { a_gs.UnloadContent (); GameStates.Remove (a_gs); GameStatesToUpdate.Remove (a_gs);
} public GameState State (GameState a_gs) { foreach (GameState gs in GameStates) { if (gs.ID.ToLower ().Equals (a_gs.ID.ToLower ())) return gs; } return null;