public void AddInteractionController() { var controller = new SmartController(); var buttonsCreated = StaticServiceLocator.ContainsService <List <IButtonAble> >(); if (!buttonsCreated) { var interactButton = new List <IButtonAble> { new KeyButton(Keys.E), new GamePadButton(Buttons.A) }; StaticServiceLocator.AddService(interactButton); } var buttons = StaticServiceLocator.GetService <List <IButtonAble> >(); var smartButton = new CompositeSmartButton(buttons) { OnButtonJustPressed = (sender, args) => { if (!DialogBox.Interact()) { InteractEvent?.Invoke(this, null); } } }; controller.AddButton(smartButton); var upButton = new List <IButtonAble> { new DirectionGamePadButton(Buttons.DPadUp, PlayerIndex.One, false) }; var smartUpButton = new CompositeSmartButton(upButton) { OnButtonJustPressed = (sender, args) => { DialogBox.Up(); } }; controller.AddButton(smartUpButton); var downButton = new List <IButtonAble> { new DirectionGamePadButton(Buttons.DPadDown, PlayerIndex.One, false) }; var smartDownButton = new CompositeSmartButton(downButton) { OnButtonJustPressed = (sender, args) => { DialogBox.Down(); } }; controller.AddButton(smartDownButton); var optionsButtons = new List <IButtonAble> { new KeyButton(Keys.Escape), new GamePadButton(Buttons.Start) }; var optionsAction = new CompositeSmartButton(optionsButtons) { OnButtonJustPressed = (sender, args) => { _backButtonClickEvent.Invoke(this, null); } }; controller.AddButton(optionsAction); UpdateList.Add(controller); }