public void Setup(MenuService service) { var settings = new MenuSettings { Start = service.StartGame, ShowOptions = service.ShowOptions, Quit = service.Quit }; _components.Setup(settings); }
public void Setup(MenuSettings settings) { _startButton.SetOnClickAction(settings.Start); _optionsButton.SetOnClickAction(settings.ShowOptions); _quitButton.SetOnClickAction(settings.Quit); }