public void OnClick() { if (m_BackTopPreviousMenu != null) { Console.WriteLine("Backed To the {0}", m_BackTopPreviousMenu.ItemName()); } }
public Back(Menu i_BackTopPreviousMenu) { if (i_BackTopPreviousMenu == null) { m_Name = "Exit"; } else { m_Name = string.Format("Back to {0}", i_BackTopPreviousMenu.ItemName()); } m_BackTopPreviousMenu = i_BackTopPreviousMenu; }