Пример #1
0
    //[SerializeField]
    //private UI_DietyMenu dietySelectionMenu;

    public virtual void Init(UI_PlayerBase creator)
    {
        base.Init(creator, "Make a Sacrifice:");

        float w = 500.0f;
        float h = 400.0f;

        panel = new Rect(Screen.width / 2.0f - w / 2.0f, Screen.height / 2.0f - h / 2.0f, w, h);

        childMenu = new UI_DietyMenu();
        childMenu.panelBackground = panelBackground;
        childMenu.Init(creator, "Select which Diety to sacrifice to", this);
    }
Пример #2
0
    //[SerializeField]
    //private UI_DietyMenu dietySelectionMenu;
    public virtual void Init(UI_PlayerBase creator)
    {
        base.Init(creator, "Make a Sacrifice:");

        float w = 500.0f;
        float h = 400.0f;

        panel = new Rect(Screen.width / 2.0f - w / 2.0f, Screen.height / 2.0f - h / 2.0f, w, h);

        childMenu = new UI_DietyMenu();
        childMenu.panelBackground = panelBackground;
        childMenu.Init(creator, "Select which Diety to sacrifice to", this);
    }
Пример #3
0
    public void SacrificeSelected(MenuButton pressed)
    {
        selectedItem = pressed.text;

        UI_DietyMenu dietySubMenu = (UI_DietyMenu)childMenu;

        // Sacrifice has been selected, not the player choosees which god to sacrfice to
        if (dietySubMenu != null)
        {
            dietySubMenu.SetSacrificeItem(selectedItem);
            dietySubMenu.OpenMenu();
        }

        CloseMenu();
    }