void OnToggleActionTriggered(DCLAction_Trigger action) { if (view) { SetVisibility(!view.IsVisible()); OnToggleTriggered?.Invoke(); } }
public ExploreHUDController() { view = UnityEngine.Object.Instantiate(Resources.Load <GameObject>("ExploreHUD")).GetComponent <ExploreHUDView>(); view.name = "_ExploreHUD"; view.popup.gameObject.SetActive(false); toggleExploreTrigger = Resources.Load <InputAction_Trigger>("ToggleExploreHud"); toggleExploreTrigger.OnTriggered += OnToggleActionTriggered; view.OnCloseButtonPressed += () => { if (view.IsVisible()) { toggleExploreTrigger.RaiseOnTriggered(); } }; view.gotoMagicButton.OnGotoMagicPressed += GoToMagic; view.togglePopupButton.onPointerDown += () => toggleExploreTrigger.RaiseOnTriggered(); HotSceneCellView.OnJumpIn += OnJumpIn; }