Ejemplo n.º 1
0
    public void AddUnlockToUI(BusinessUIElement b)
    {
        GameObject unlockEl = Instantiate(unlockUIElementPrefab) as GameObject;

        unlockEl.transform.SetParent(unlocksContainer.transform, false);
        b.currentUnlockUIElement = unlockEl.GetComponent <UnlockUIElement>();
        b.currentUnlockUIElement.SetupUI(b.info, b.info.state.currentUnlock);
    }
Ejemplo n.º 2
0
    public void AddBusinessToUI(BusinessInfo b)
    {
        GameObject        prefab = Instantiate(businessUIElementPrefab) as GameObject;
        BusinessUIElement ui     = prefab.GetComponent <BusinessUIElement>();

        ui.info = b;
        businessUIElements.Add(ui);
        AddUnlockToUI(ui);
    }