Ejemplo n.º 1
0
    public void Initialize(string itemId, int craftTime)
    {
        SubscribeToEvents();

        this.itemId      = itemId;
        itemImage.sprite = UIManager.Instance.GetItemIcon(this.itemId);
        bar.Initialize(0, craftTime);
    }
Ejemplo n.º 2
0
    public void Initialize()
    {
        SubscribeToEvents();

        particleMat             = GetComponent <ParticleSystemRenderer> ().material;
        particleMat.mainTexture = particleImage;

        requiredClicks = Data.GetItemData(itemId).Clicks;
        bar.Initialize(currentClicks, requiredClicks);
    }
Ejemplo n.º 3
0
    public void AddUIBar(UIBarInfo uib)
    {
        if (uib.id == "SameAsLabel")
        {
            uib.id = uib.UILabel;
        }
        RemoveUIBar(uib.id);
        GameObject newBar = Instantiate(UIBarPrefab, transform);

        uib.element = newBar;
        UIBar uibar = uib.element.GetComponent <UIBar>();

        uibar.Initialize(uib, uibars.Count);
        uib.uib = uibar;
        uibars.Add(uib.id, uib);
    }