Exemplo n.º 1
0
    protected override void AfterSpawn()
    {
        SkillSlotUI slot = SpawnedInstance.GetComponent <SkillSlotUI>();

        slot.SetSlotID(skillSlotID);
        slot.LoadData();
    }
Exemplo n.º 2
0
    protected override void AfterSpawn()
    {
        var popupMenu = SpawnedInstance.GetComponent <PopupMenuUI>();

        Debug.Assert(popupMenu != null);

        popupMenu.Init(menuId, content);
    }
    protected override void AfterSpawn()
    {
        CharacterThumbnailUI thumbnail = SpawnedInstance.GetComponent <CharacterThumbnailUI>();

        thumbnail.SetCharacterSlotID(characterSlotID);
        SpawnedInstance.gameObject.transform.SetParent(parentTransform);
        SpawnedInstance.transform.SetSiblingIndex(characterSlotID);
    }
Exemplo n.º 4
0
    protected override void AfterSpawn()
    {
        StatBarUI statBar = SpawnedInstance.GetComponent <StatBarUI>();

        statBar.statType = statType;
        statBar.statName = statName;
        statBar.LoadData();
    }
Exemplo n.º 5
0
    protected override void AfterSpawn()
    {
        if (choices != null && CurrentInstanceId < choices.Count)
        {
            Button button = SpawnedInstance.GetComponent <Button>();

            Text text = null;
            button.FindOrSpawnChildWithComponent(ref text, "Text");
            text.text = choices[CurrentInstanceId].Text;

            button.onClick.AddListener(MenuController.Instance.CloseTopMenu);
            button.onClick.AddListener(choices[CurrentInstanceId].InvokeCallback);
        }
    }
Exemplo n.º 6
0
    protected override void AfterSpawn()
    {
        MenuSwitcherButtonUI button = SpawnedInstance.GetComponent <MenuSwitcherButtonUI>();

        Debug.Assert(menus != null && menus.Count > CurrentInstanceId);
        Debug.Assert(button != null);

        var menuId = menus[CurrentInstanceId].Item1;

        button.MenuId = menuId;
        button.UpdateNotification(menuId);
        button.ButtonString = menus[CurrentInstanceId].Item2;
        button.Spawner      = this;

        SpawnedInstance.gameObject.transform.SetParent(parentTransform);
    }
    protected override void AfterSpawn()
    {
        if (parentMenu == null)
        {
            parentMenu = GetComponentInParent <InventoryMenu>();
        }
        Debug.Assert(parentMenu != null);

        InventorySlotUI inventorySlotUi = SpawnedInstance.GetComponent <InventorySlotUI>();

        switch (slotType)
        {
        case SpawnedSlotType.Inventory:
            inventorySlotUi.Initialize(parentMenu, new InventoryMenu.ItemSlotID(CurrentInstanceId));
            break;

        case SpawnedSlotType.Equipment:
            inventorySlotUi.Initialize(parentMenu, new InventoryMenu.ItemSlotID(eqSlotOrder[CurrentInstanceId]), eqSlotNames[CurrentInstanceId]);
            break;
        }
    }