// Use this for initialization
    void Start()
    {
        var test = (GameModel)ApplicationFacade.instance.GetModel <GameModel>();

        TestButtonText.text = test.OtherViewText;

        var e = new NavigationEvents.LoadContextEvent(new MainContext(), true);

        TestButton.onClick.AddListener(delegate
        {
            EventSystem.instance.Dispatch(e);
        });

        var event2 = new NavigationEvents.PreviousContextEvent();

        BackButton.onClick.AddListener(delegate
        {
            EventSystem.instance.Dispatch(event2);
        });

        var popup  = AssetDatabase.instance.GetAsset <PopupAsset>("BASIC");
        var event3 = new PopupEvents.OpenPopupEvent(popup);

        PopupButton.onClick.AddListener(delegate
        {
            EventSystem.instance.Dispatch(event3);
        });
    }
Example #2
0
    private void OnPopupOpen(PopupEvents.OpenPopupEvent e)
    {
        if (View == null)
        {
            InstantiateView();
        }

        View.GetComponent <PopupView>().StackPopup(e.Popup);
    }
    protected override void OnPopupOpen(PopupEvents.OpenPopupEvent e)
    {
        if (View == null)
        {
            InstantiateView();
        }

        View.GetComponent <UnitInfoView>().StackUnitPopup(e.Popup, _gridModel.SelectedUnit.gameObject);
    }