Exemplo n.º 1
0
    public void SetObjectAndParent(MyObjectToPlace objectToPlace, VerticalSubMenu verticalSubMenu)
    {
        currentObject        = objectToPlace;
        this.verticalSubMenu = verticalSubMenu;

        itemImage.sprite = objectToPlace.sprite;
        priceText.text   = $"Price : {objectToPlace.price} $";
        nameText.text    = objectToPlace.name;
    }
Exemplo n.º 2
0
    public void SetObject(MyObjectToPlace objectToPlace)
    {
        currentObject = objectToPlace;

        itemImage.sprite = objectToPlace.sprite;
        priceText.text   = $"Price : {objectToPlace.price} $";
        nameText.text    = objectToPlace.name;

        slotSelection.HotBarSelection?.Invoke(ID);
    }
Exemplo n.º 3
0
    public void Unfold(MyObjectToPlace current)
    {
        parentMainSlot.HideVisuals(false);
        isUnFold = true;

        foreach (MyObjectToPlace o in objectList)
        {
            SubSlot newInstance = Instantiate(subSlotPrefab, this.transform);
            newInstance.SetObjectAndParent(o, this);

            subSlots.Add(newInstance);
        }

        subSlots.Where(x => x.currentObject.Equals(current)).FirstOrDefault().transform.SetAsLastSibling();
    }
Exemplo n.º 4
0
 public void Select(MyObjectToPlace objectTo)
 {
     parentMainSlot.SetObject(objectTo);
     Fold();
 }