예제 #1
0
 /// <summary>
 /// Switch menu
 /// </summary>
 /// <param name="menu">New menu</param>
 public void ChangeMenu(IMenus menu)
 {
     currentMenu?.UnloadContent();             // ?. to avoid crash on the first menu load
     currentMenu = menu;
     currentMenu.Initialize();
     currentMenu.LoadContent(Content, GraphicsDevice);
 }